mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
Only record a package once in the source->binary package mapping
If there are multiple versions of an arch:all package in unstable (due to outdated or no longer built arch:any packages) then only one of them should be recorded in the list of binary packages built from the source package. Otherwise we may try and remove the binary package from various lists multiple times, leading to crashes. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
parent
9ee37c5160
commit
84bad954ad
12
britney.py
12
britney.py
@ -555,12 +555,20 @@ class Britney(object):
|
||||
if "(" in source:
|
||||
dpkg[SOURCEVER] = source[source.find("(")+1:source.find(")")]
|
||||
|
||||
pkgarch = "%s/%s" % (pkg,arch)
|
||||
# if the source package is available in the distribution, then register this binary package
|
||||
if dpkg[SOURCE] in sources[distribution]:
|
||||
sources[distribution][dpkg[SOURCE]][BINARIES].append(pkg + "/" + arch)
|
||||
# There may be multiple versions of any arch:all packages
|
||||
# (in unstable) if some architectures have out-of-date
|
||||
# binaries. We only want to include the package in the
|
||||
# source -> binary mapping once. It doesn't matter which
|
||||
# of the versions we include as only the package name and
|
||||
# architecture are recorded.
|
||||
if pkgarch not in sources[distribution][dpkg[SOURCE]][BINARIES]:
|
||||
sources[distribution][dpkg[SOURCE]][BINARIES].append(pkgarch)
|
||||
# if the source package doesn't exist, create a fake one
|
||||
else:
|
||||
sources[distribution][dpkg[SOURCE]] = [dpkg[SOURCEVER], 'faux', [pkg + "/" + arch], None, True]
|
||||
sources[distribution][dpkg[SOURCE]] = [dpkg[SOURCEVER], 'faux', [pkgarch], None, True]
|
||||
|
||||
# register virtual packages and real packages that provide them
|
||||
if dpkg[PROVIDES]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user