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]
|
l[0:1] = l[0]
|
||||||
if l: yield l.pop(0)
|
if l: yield l.pop(0)
|
||||||
|
|
||||||
|
# read mapping between Gentoo and Debian packages
|
||||||
deb2gen = dict()
|
deb2gen = dict()
|
||||||
gen2deb = dict()
|
gen2deb = dict()
|
||||||
with open("./deb2gen_mapping.list") as f:
|
with open("./deb2gen_mapping.list") as f:
|
||||||
|
@ -104,7 +105,8 @@ before = datetime.now()
|
||||||
debian_deps = dict()
|
debian_deps = dict()
|
||||||
missing_gen_mappings = list()
|
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):
|
for i, (cat, pkg, ver, rev) in enumerate(pkgnames):
|
||||||
if rev == "r0":
|
if rev == "r0":
|
||||||
pkgname = "%s/%s-%s"%(cat, pkg, ver)
|
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)
|
no_use = use_reduce(depend, matchnone=True)
|
||||||
l = list()
|
l = list()
|
||||||
for a in all_use:
|
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:
|
if a in no_use:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -163,6 +165,8 @@ missing_deb_mappings = list()
|
||||||
src2bin = dict()
|
src2bin = dict()
|
||||||
src_deps = 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]):
|
for pkg in apt_pkg.TagFile(sys.argv[1]):
|
||||||
p = pkg['Package']
|
p = pkg['Package']
|
||||||
try:
|
try:
|
||||||
|
@ -172,7 +176,11 @@ for pkg in apt_pkg.TagFile(sys.argv[1]):
|
||||||
src_deps[p] = []
|
src_deps[p] = []
|
||||||
src2bin[p] = [b.strip() for b in pkg['Binary'].split(',')]
|
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:
|
for d in debian_names:
|
||||||
# find gentoo package name
|
# find gentoo package name
|
||||||
g = deb2gen.get(d)
|
g = deb2gen.get(d)
|
||||||
|
|
Loading…
Reference in a new issue