mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-10 22:17:36 +00:00
Support implicit (t)pu hint items
If a hint item references unstable but its version is not correct for that suite, we compare the version to the (t)pu version (if any) and if a match is found update the item as if it had been explicitly specified as applying to that suite originally. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
parent
56afba5d4b
commit
45c11a1f57
19
britney.py
19
britney.py
@ -2572,21 +2572,32 @@ class Britney:
|
|||||||
|
|
||||||
ok = True
|
ok = True
|
||||||
# loop on the requested packages and versions
|
# loop on the requested packages and versions
|
||||||
for pkg in _pkgvers:
|
for idx in range(len(_pkgvers)):
|
||||||
|
pkg = _pkgvers[idx]
|
||||||
# skip removal requests
|
# skip removal requests
|
||||||
if pkg.is_removal:
|
if pkg.is_removal:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
inunstable = pkg.package in self.sources['unstable']
|
||||||
|
rightversion = inunstable and (apt_pkg.VersionCompare(self.sources['unstable'][pkg.package][VERSION], pkg.version) == 0)
|
||||||
|
if pkg.suite == 'unstable' and not rightversion:
|
||||||
|
for suite in ['pu', 'tpu']:
|
||||||
|
if pkg.package in self.sources[suite] and apt_pkg.VersionCompare(self.sources[suite][pkg.package][VERSION], pkg.version) == 0:
|
||||||
|
pkg.suite = suite
|
||||||
|
_pkgvers[idx] = pkg
|
||||||
|
break
|
||||||
|
|
||||||
# handle *-proposed-updates
|
# handle *-proposed-updates
|
||||||
elif pkg.suite in ['pu', 'tpu']:
|
if pkg.suite in ['pu', 'tpu']:
|
||||||
if pkg.package not in self.sources[pkg.suite]: continue
|
if pkg.package not in self.sources[pkg.suite]: continue
|
||||||
if apt_pkg.VersionCompare(self.sources[pkg.suite][pkg.package][VERSION], pkg.version) != 0:
|
if apt_pkg.VersionCompare(self.sources[pkg.suite][pkg.package][VERSION], pkg.version) != 0:
|
||||||
self.output_write(" Version mismatch, %s %s != %s\n" % (pkg.package, pkg.version, self.sources[pkg.suite][pkg.package][VERSION]))
|
self.output_write(" Version mismatch, %s %s != %s\n" % (pkg.package, pkg.version, self.sources[pkg.suite][pkg.package][VERSION]))
|
||||||
ok = False
|
ok = False
|
||||||
# does the package exist in unstable?
|
# does the package exist in unstable?
|
||||||
elif pkg.package not in self.sources['unstable']:
|
elif not inunstable:
|
||||||
self.output_write(" Source %s has no version in unstable\n" % pkg.package)
|
self.output_write(" Source %s has no version in unstable\n" % pkg.package)
|
||||||
ok = False
|
ok = False
|
||||||
elif apt_pkg.VersionCompare(self.sources['unstable'][pkg.package][VERSION], pkg.version) != 0:
|
elif not rightversion:
|
||||||
self.output_write(" Version mismatch, %s %s != %s\n" % (pkg.package, pkg.version, self.sources['unstable'][pkg.package][VERSION]))
|
self.output_write(" Version mismatch, %s %s != %s\n" % (pkg.package, pkg.version, self.sources['unstable'][pkg.package][VERSION]))
|
||||||
ok = False
|
ok = False
|
||||||
if not ok:
|
if not ok:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user