mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-28 02:41:35 +00:00
Britney allows versioned dependencies on virtual packages while generating excuses but not while executing UpgradeRun. This seems weird to me, but I have to stay with it as long as I need to compare my output with the original one.
This commit is contained in:
parent
f61981a611
commit
728cfa7d6c
@ -679,7 +679,7 @@ class Britney:
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def get_dependency_solvers(self, block, arch, distribution, excluded=[]):
|
def get_dependency_solvers(self, block, arch, distribution, excluded=[], strict=False):
|
||||||
"""Find the packages which satisfy a dependency block
|
"""Find the packages which satisfy a dependency block
|
||||||
|
|
||||||
This method returns the list of packages which satisfy a dependency
|
This method returns the list of packages which satisfy a dependency
|
||||||
@ -713,7 +713,7 @@ class Britney:
|
|||||||
# TODO: this is forbidden by the debian policy, which says that versioned
|
# TODO: this is forbidden by the debian policy, which says that versioned
|
||||||
# dependencies on virtual packages are never satisfied. The old britney
|
# dependencies on virtual packages are never satisfied. The old britney
|
||||||
# does it and we have to go with it, but at least a warning should be raised.
|
# does it and we have to go with it, but at least a warning should be raised.
|
||||||
if op == '' and version == '' or apt_pkg.CheckDep(package['version'], op, version):
|
if op == '' and version == '' or not strict and apt_pkg.CheckDep(package['version'], op, version):
|
||||||
packages.append(prov)
|
packages.append(prov)
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -742,7 +742,7 @@ class Britney:
|
|||||||
# for every block of dependency (which is formed as conjunction of disconjunction)
|
# for every block of dependency (which is formed as conjunction of disconjunction)
|
||||||
for block, block_txt in zip(apt_pkg.ParseDepends(binary_u[type_key]), binary_u[type_key].split(',')):
|
for block, block_txt in zip(apt_pkg.ParseDepends(binary_u[type_key]), binary_u[type_key].split(',')):
|
||||||
# if the block is satisfied in testing, then skip the block
|
# if the block is satisfied in testing, then skip the block
|
||||||
solved, packages = self.get_dependency_solvers(block, arch, 'testing', excluded)
|
solved, packages = self.get_dependency_solvers(block, arch, 'testing', excluded, strict=(excuse == None))
|
||||||
if solved: continue
|
if solved: continue
|
||||||
elif excuse == None:
|
elif excuse == None:
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user