mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-24 08:51:31 +00:00
read_pkgs: Parse Provides a bit earlier
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
946d705e2b
commit
c4e7596837
61
britney.py
61
britney.py
@ -678,34 +678,9 @@ class Britney(object):
|
|||||||
if "(" in source_raw:
|
if "(" in source_raw:
|
||||||
source_version = intern(source_raw[source_raw.find("(")+1:source_raw.find(")")])
|
source_version = intern(source_raw[source_raw.find("(")+1:source_raw.find(")")])
|
||||||
|
|
||||||
dpkg = [version,
|
provides_raw = get_field('Provides')
|
||||||
intern(get_field('Section')),
|
if provides_raw:
|
||||||
source,
|
parts = apt_pkg.parse_depends(provides_raw, False)
|
||||||
source_version,
|
|
||||||
intern(get_field('Architecture')),
|
|
||||||
get_field('Multi-Arch'),
|
|
||||||
deps,
|
|
||||||
', '.join(final_conflicts_list) or None,
|
|
||||||
get_field('Provides'),
|
|
||||||
ess,
|
|
||||||
]
|
|
||||||
|
|
||||||
# if the source package is available in the distribution, then register this binary package
|
|
||||||
if source in srcdist:
|
|
||||||
# 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 pkg_id not in srcdist[source][BINARIES]:
|
|
||||||
srcdist[source][BINARIES].append(pkg_id)
|
|
||||||
# if the source package doesn't exist, create a fake one
|
|
||||||
else:
|
|
||||||
srcdist[source] = [source_version, 'faux', [pkg_id], None, True]
|
|
||||||
|
|
||||||
if dpkg[PROVIDES]:
|
|
||||||
parts = apt_pkg.parse_depends(dpkg[PROVIDES], False)
|
|
||||||
nprov = []
|
nprov = []
|
||||||
for or_clause in parts:
|
for or_clause in parts:
|
||||||
if len(or_clause) != 1:
|
if len(or_clause) != 1:
|
||||||
@ -722,9 +697,35 @@ class Britney(object):
|
|||||||
provided_version = intern(provided_version)
|
provided_version = intern(provided_version)
|
||||||
part = (provided, provided_version, intern(op))
|
part = (provided, provided_version, intern(op))
|
||||||
nprov.append(part)
|
nprov.append(part)
|
||||||
dpkg[PROVIDES] = nprov
|
provides = nprov
|
||||||
else:
|
else:
|
||||||
dpkg[PROVIDES] = []
|
provides = []
|
||||||
|
|
||||||
|
dpkg = [version,
|
||||||
|
intern(get_field('Section')),
|
||||||
|
source,
|
||||||
|
source_version,
|
||||||
|
intern(get_field('Architecture')),
|
||||||
|
get_field('Multi-Arch'),
|
||||||
|
deps,
|
||||||
|
', '.join(final_conflicts_list) or None,
|
||||||
|
provides,
|
||||||
|
ess,
|
||||||
|
]
|
||||||
|
|
||||||
|
# if the source package is available in the distribution, then register this binary package
|
||||||
|
if source in srcdist:
|
||||||
|
# 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 pkg_id not in srcdist[source][BINARIES]:
|
||||||
|
srcdist[source][BINARIES].append(pkg_id)
|
||||||
|
# if the source package doesn't exist, create a fake one
|
||||||
|
else:
|
||||||
|
srcdist[source] = [source_version, 'faux', [pkg_id], None, True]
|
||||||
|
|
||||||
# add the resulting dictionary to the package list
|
# add the resulting dictionary to the package list
|
||||||
packages[pkg] = dpkg
|
packages[pkg] = dpkg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user