mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 23:38:20 +00:00
Only ignore hints for the same package if arch matches
Signed-off-by: Ivo De Decker <ivodd@debian.org>
This commit is contained in:
parent
7090c23efc
commit
b395c6f760
17
britney.py
17
britney.py
@ -703,29 +703,30 @@ class Britney(object):
|
||||
hints = self._hint_parser.hints
|
||||
|
||||
for x in ["block", "block-all", "block-udeb", "unblock", "unblock-udeb", "force", "urgent", "remove", "age-days"]:
|
||||
z = {}
|
||||
z = defaultdict(dict)
|
||||
for hint in hints[x]:
|
||||
package = hint.package
|
||||
architecture = hint.architecture
|
||||
key = (hint, hint.user)
|
||||
if package in z and z[package] != key:
|
||||
hint2 = z[package][0]
|
||||
if package in z and architecture in z[package] and z[package][architecture] != key:
|
||||
hint2 = z[package][architecture][0]
|
||||
if x in ['unblock', 'unblock-udeb']:
|
||||
if apt_pkg.version_compare(hint2.version, hint.version) < 0:
|
||||
# This hint is for a newer version, so discard the old one
|
||||
self.logger.warning("Overriding %s[%s] = ('%s', '%s') with ('%s', '%s')",
|
||||
x, package, hint2.version, hint2.user, hint.version, hint.user)
|
||||
self.logger.warning("Overriding %s[%s] = ('%s', '%s', '%s') with ('%s', '%s', '%s')",
|
||||
x, package, hint2.version, hint2.architecture, hint2.user, hint.version, hint.architecture, hint.user)
|
||||
hint2.set_active(False)
|
||||
else:
|
||||
# This hint is for an older version, so ignore it in favour of the new one
|
||||
self.logger.warning("Ignoring %s[%s] = ('%s', '%s'), ('%s', '%s') is higher or equal",
|
||||
x, package, hint.version, hint.user, hint2.version, hint2.user)
|
||||
self.logger.warning("Ignoring %s[%s] = ('%s', '%s', '%s'), ('%s', '%s', '%s') is higher or equal",
|
||||
x, package, hint.version, hint.architecture, hint.user, hint2.version, hint2.architecture, hint2.user)
|
||||
hint.set_active(False)
|
||||
else:
|
||||
self.logger.warning("Overriding %s[%s] = ('%s', '%s') with ('%s', '%s')",
|
||||
x, package, hint2.user, hint2, hint.user, hint)
|
||||
hint2.set_active(False)
|
||||
|
||||
z[package] = key
|
||||
z[package][architecture] = key
|
||||
|
||||
# Sanity check the hints hash
|
||||
if len(hints["block"]) == 0 and len(hints["block-udeb"]) == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user