add comments
This commit is contained in:
parent
70659ae66b
commit
4bee037807
1 changed files with 11 additions and 3 deletions
|
@ -43,6 +43,7 @@ def flatten(l):
|
|||
l[0:1] = l[0]
|
||||
if l: yield l.pop(0)
|
||||
|
||||
# read mapping between Gentoo and Debian packages
|
||||
deb2gen = dict()
|
||||
gen2deb = dict()
|
||||
with open("./deb2gen_mapping.list") as f:
|
||||
|
@ -104,7 +105,8 @@ before = datetime.now()
|
|||
debian_deps = dict()
|
||||
missing_gen_mappings = list()
|
||||
|
||||
# look for reduced build dependencies
|
||||
# look for reduced build dependencies of gentoo packages by extracting all
|
||||
# dependencies that need a USE flag to be set
|
||||
for i, (cat, pkg, ver, rev) in enumerate(pkgnames):
|
||||
if rev == "r0":
|
||||
pkgname = "%s/%s-%s"%(cat, pkg, ver)
|
||||
|
@ -119,7 +121,7 @@ for i, (cat, pkg, ver, rev) in enumerate(pkgnames):
|
|||
no_use = use_reduce(depend, matchnone=True)
|
||||
l = list()
|
||||
for a in all_use:
|
||||
# filter out all dependencies that are also present without USE flags enabled
|
||||
# filter out all dependencies that are also present when USE flags are disabled
|
||||
if a in no_use:
|
||||
continue
|
||||
|
||||
|
@ -163,6 +165,8 @@ missing_deb_mappings = list()
|
|||
src2bin = dict()
|
||||
src_deps = dict()
|
||||
|
||||
# get the actual Debian build dependencies for all interesting packages from a
|
||||
# Sources file
|
||||
for pkg in apt_pkg.TagFile(sys.argv[1]):
|
||||
p = pkg['Package']
|
||||
try:
|
||||
|
@ -172,7 +176,11 @@ for pkg in apt_pkg.TagFile(sys.argv[1]):
|
|||
src_deps[p] = []
|
||||
src2bin[p] = [b.strip() for b in pkg['Binary'].split(',')]
|
||||
|
||||
# process all debian source packages
|
||||
all_droppable = list()
|
||||
|
||||
# process all debian source packages and output those build dependencies that
|
||||
# build from a source package which is not needed by the corresponding Gentoo
|
||||
# package
|
||||
for d in debian_names:
|
||||
# find gentoo package name
|
||||
g = deb2gen.get(d)
|
||||
|
|
Loading…
Reference in a new issue