mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-19 06:21:31 +00:00
merge lp:~ubuntu-archive/britney/britney2
This commit is contained in:
commit
9388587b95
45
britney.py
45
britney.py
@ -610,8 +610,8 @@ class Britney(object):
|
|||||||
# register real packages
|
# register real packages
|
||||||
if a[0] in packages and (not check_doubles or pkg not in packages[a[0]][RDEPENDS]):
|
if a[0] in packages and (not check_doubles or pkg not in packages[a[0]][RDEPENDS]):
|
||||||
packages[a[0]][RDEPENDS].append(pkg)
|
packages[a[0]][RDEPENDS].append(pkg)
|
||||||
# register packages which provide a virtual package
|
# also register packages which provide the package (if any)
|
||||||
elif a[0] in provides:
|
if a[0] in provides:
|
||||||
for i in provides.get(a[0]):
|
for i in provides.get(a[0]):
|
||||||
if i not in packages: continue
|
if i not in packages: continue
|
||||||
if not check_doubles or pkg not in packages[i][RDEPENDS]:
|
if not check_doubles or pkg not in packages[i][RDEPENDS]:
|
||||||
@ -623,8 +623,8 @@ class Britney(object):
|
|||||||
# register real packages
|
# register real packages
|
||||||
if a[0] in packages and (not check_doubles or pkg not in packages[a[0]][RCONFLICTS]):
|
if a[0] in packages and (not check_doubles or pkg not in packages[a[0]][RCONFLICTS]):
|
||||||
packages[a[0]][RCONFLICTS].append(pkg)
|
packages[a[0]][RCONFLICTS].append(pkg)
|
||||||
# register packages which provide a virtual package
|
# also register packages which provide the package (if any)
|
||||||
elif a[0] in provides:
|
if a[0] in provides:
|
||||||
for i in provides[a[0]]:
|
for i in provides[a[0]]:
|
||||||
if i not in packages: continue
|
if i not in packages: continue
|
||||||
if not check_doubles or pkg not in packages[i][RCONFLICTS]:
|
if not check_doubles or pkg not in packages[i][RCONFLICTS]:
|
||||||
@ -1202,7 +1202,10 @@ class Britney(object):
|
|||||||
# for the solving packages, update the excuse to add the dependencies
|
# for the solving packages, update the excuse to add the dependencies
|
||||||
for p in packages:
|
for p in packages:
|
||||||
if arch not in self.options.break_arches.split():
|
if arch not in self.options.break_arches.split():
|
||||||
excuse.add_dep(p, arch)
|
if p in self.sources['testing'] and self.sources['testing'][p][VERSION] == self.sources[suite][p][VERSION]:
|
||||||
|
excuse.add_dep("%s/%s" % (p, arch), arch)
|
||||||
|
else:
|
||||||
|
excuse.add_dep(p, arch)
|
||||||
else:
|
else:
|
||||||
excuse.add_break_dep(p, arch)
|
excuse.add_break_dep(p, arch)
|
||||||
|
|
||||||
@ -2052,7 +2055,10 @@ class Britney(object):
|
|||||||
key = (binary, parch)
|
key = (binary, parch)
|
||||||
# obviously, added/modified packages are affected
|
# obviously, added/modified packages are affected
|
||||||
if key not in affected: affected.add(key)
|
if key not in affected: affected.add(key)
|
||||||
# if the binary already exists (built from another source)
|
# if the binary already exists in testing, it is currently
|
||||||
|
# built by another source package. we therefore remove the
|
||||||
|
# version built by the other source package, after marking
|
||||||
|
# all of its reverse dependencies as affected
|
||||||
if binary in binaries[parch][0]:
|
if binary in binaries[parch][0]:
|
||||||
# save the old binary package
|
# save the old binary package
|
||||||
undo['binaries'][p] = binaries[parch][0][binary]
|
undo['binaries'][p] = binaries[parch][0][binary]
|
||||||
@ -2067,9 +2073,13 @@ class Britney(object):
|
|||||||
if key not in affected: affected.add(key)
|
if key not in affected: affected.add(key)
|
||||||
self.systems[parch].remove_binary(binary)
|
self.systems[parch].remove_binary(binary)
|
||||||
else:
|
else:
|
||||||
# if the binary was previously built by a different
|
# the binary isn't in testing, but it may have been at
|
||||||
# source package in testing, all of the reverse
|
# the start of the current hint and have been removed
|
||||||
# dependencies of the old binary are affected.
|
# by an earlier migration. if that's the case then we
|
||||||
|
# will have a record of the older instance of the binary
|
||||||
|
# in the undo information. we can use that to ensure
|
||||||
|
# that the reverse dependencies of the older binary
|
||||||
|
# package are also checked.
|
||||||
# reverse dependencies built from this source can be
|
# reverse dependencies built from this source can be
|
||||||
# ignored as their reverse trees are already handled
|
# ignored as their reverse trees are already handled
|
||||||
# by this function
|
# by this function
|
||||||
@ -2258,8 +2268,6 @@ class Britney(object):
|
|||||||
|
|
||||||
nuninst[arch] = set([x for x in nuninst_comp[arch] if x in binaries[arch][0]])
|
nuninst[arch] = set([x for x in nuninst_comp[arch] if x in binaries[arch][0]])
|
||||||
nuninst[arch + "+all"] = set([x for x in nuninst_comp[arch + "+all"] if x in binaries[arch][0]])
|
nuninst[arch + "+all"] = set([x for x in nuninst_comp[arch + "+all"] if x in binaries[arch][0]])
|
||||||
broken = nuninst[arch + "+all"]
|
|
||||||
to_check = []
|
|
||||||
|
|
||||||
check_packages(arch, affected, skip_archall, nuninst, pkg)
|
check_packages(arch, affected, skip_archall, nuninst, pkg)
|
||||||
|
|
||||||
@ -2542,13 +2550,22 @@ class Britney(object):
|
|||||||
# run the auto hinter
|
# run the auto hinter
|
||||||
self.auto_hinter()
|
self.auto_hinter()
|
||||||
|
|
||||||
# obsolete source packages
|
# obsolete source packages
|
||||||
|
# a package is obsolete if none of the binary packages in testing
|
||||||
|
# are built by it
|
||||||
if getattr(self.options, "remove_obsolete", "yes") == "yes":
|
if getattr(self.options, "remove_obsolete", "yes") == "yes":
|
||||||
self.__log("> Removing obsolete source packages from testing", type="I")
|
self.__log("> Removing obsolete source packages from testing", type="I")
|
||||||
removals = []
|
removals = []
|
||||||
|
# local copies for performance
|
||||||
sources = self.sources['testing']
|
sources = self.sources['testing']
|
||||||
removals = [ HintItem("-%s/%s" % (source, sources[source][VERSION])) for \
|
binaries = self.binaries['testing']
|
||||||
source in sources if len(sources[source][BINARIES]) == 0 ]
|
used = set(binaries[arch][0][binary][SOURCE]
|
||||||
|
for arch in binaries
|
||||||
|
for binary in binaries[arch][0]
|
||||||
|
)
|
||||||
|
removals = [ HintItem("-%s/%s" % (source, sources[source][VERSION]))
|
||||||
|
for source in sources if source not in used
|
||||||
|
]
|
||||||
if len(removals) > 0:
|
if len(removals) > 0:
|
||||||
self.output_write("Removing obsolete source packages from testing (%d):\n" % (len(removals)))
|
self.output_write("Removing obsolete source packages from testing (%d):\n" % (len(removals)))
|
||||||
self.do_all(actions=removals)
|
self.do_all(actions=removals)
|
||||||
|
10
excuse.py
10
excuse.py
@ -135,11 +135,15 @@ class Excuse(object):
|
|||||||
(self.daysold, self.mindays))
|
(self.daysold, self.mindays))
|
||||||
for x in self.htmlline:
|
for x in self.htmlline:
|
||||||
res = res + "<li>" + x + "\n"
|
res = res + "<li>" + x + "\n"
|
||||||
for x in sorted(self.deps):
|
lastdep = ""
|
||||||
|
for x in sorted(self.deps, lambda x,y: cmp(x.split('/')[0], y.split('/')[0])):
|
||||||
|
dep = x.split('/')[0]
|
||||||
|
if dep == lastdep: continue
|
||||||
|
lastdep = dep
|
||||||
if x in self.invalid_deps:
|
if x in self.invalid_deps:
|
||||||
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a> (not considered)\n" % (self.name, x, x)
|
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a> (not considered)\n" % (self.name, dep, dep)
|
||||||
else:
|
else:
|
||||||
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a>\n" % (self.name, x, x)
|
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a>\n" % (self.name, dep, dep)
|
||||||
for (n,a) in self.break_deps:
|
for (n,a) in self.break_deps:
|
||||||
if n not in self.deps:
|
if n not in self.deps:
|
||||||
res += "<li>Ignoring %s depends: <a href=\"#%s\">%s</a>\n" % (a, n, n)
|
res += "<li>Ignoring %s depends: <a href=\"#%s\">%s</a>\n" % (a, n, n)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user