mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-12 11:51:09 +00:00
BuildDependsPolicy: handle old python3-apt
Very old versions, such as that run on the Ubuntu archive machine, don't have the arch parameter. Handle that by setting APT::Architecture instead
This commit is contained in:
parent
0cb7a83ef7
commit
4bd6df3d49
@ -297,6 +297,7 @@ class Britney(object):
|
||||
|
||||
# initialize the apt_pkg back-end
|
||||
apt_pkg.init()
|
||||
apt_pkg.init_config()
|
||||
|
||||
# parse the command line arguments
|
||||
self._policy_engine = PolicyEngine()
|
||||
|
@ -1086,7 +1086,14 @@ class BuildDependsPolicy(BasePolicy):
|
||||
|
||||
# for every dependency block (formed as conjunction of disjunction)
|
||||
for block_txt in deps.split(','):
|
||||
block = parse_src_depends(block_txt, False, arch)
|
||||
try:
|
||||
block = parse_src_depends(block_txt, False, arch)
|
||||
except TypeError:
|
||||
# old python3-apt didn't have the third argument
|
||||
native_arch = apt_pkg.config["APT::Architecture"]
|
||||
apt_pkg.config["APT::Architecture"] = arch
|
||||
block = parse_src_depends(block_txt, False)
|
||||
apt_pkg.config["APT::Architecture"] = native_arch
|
||||
# Unlike regular dependencies, some clauses of the Build-Depends(-Arch|-Indep) can be
|
||||
# filtered out by (e.g.) architecture restrictions. We need to cope with this while
|
||||
# keeping block_txt and block aligned.
|
||||
|
Loading…
x
Reference in New Issue
Block a user