mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-24 17:01:31 +00:00
Avoid some unnecessary effort in compuing "affected"
* A package being removed is *not* affected - It will just be filtered out later in "check_packages" * Since all transitive reverse dependencies will be added to "affected" at the end of the method, there is no reason to find the immediate set of reverse dependencies of a package if the package is added itself as well. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
37b6536cfd
commit
8ab7fc0e89
@ -2133,7 +2133,6 @@ class Britney(object):
|
|||||||
if pkey not in eqv_set:
|
if pkey not in eqv_set:
|
||||||
# all the reverse dependencies are affected by
|
# all the reverse dependencies are affected by
|
||||||
# the change
|
# the change
|
||||||
|
|
||||||
affected.update(inst_tester.reverse_dependencies_of(rm_pkg_id))
|
affected.update(inst_tester.reverse_dependencies_of(rm_pkg_id))
|
||||||
affected.update(inst_tester.negative_dependencies_of(rm_pkg_id))
|
affected.update(inst_tester.negative_dependencies_of(rm_pkg_id))
|
||||||
|
|
||||||
@ -2163,7 +2162,6 @@ class Britney(object):
|
|||||||
version = binaries_t_a[item.package][VERSION]
|
version = binaries_t_a[item.package][VERSION]
|
||||||
pkg_id = (item.package, version, item.architecture)
|
pkg_id = (item.package, version, item.architecture)
|
||||||
undo['binaries'][(item.package, item.architecture)] = pkg_id
|
undo['binaries'][(item.package, item.architecture)] = pkg_id
|
||||||
affected.add(pkg_id)
|
|
||||||
affected.update(inst_tester.reverse_dependencies_of(pkg_id))
|
affected.update(inst_tester.reverse_dependencies_of(pkg_id))
|
||||||
del binaries_t_a[item.package]
|
del binaries_t_a[item.package]
|
||||||
inst_tester.remove_testing_binary(pkg_id)
|
inst_tester.remove_testing_binary(pkg_id)
|
||||||
@ -2192,10 +2190,8 @@ class Britney(object):
|
|||||||
# save the old binary package
|
# save the old binary package
|
||||||
undo['binaries'][key] = old_pkg_id
|
undo['binaries'][key] = old_pkg_id
|
||||||
if not equivalent_replacement:
|
if not equivalent_replacement:
|
||||||
# all the reverse dependencies are affected by
|
|
||||||
# the change
|
|
||||||
affected.update(inst_tester.reverse_dependencies_of(old_pkg_id))
|
|
||||||
# all the reverse conflicts
|
# all the reverse conflicts
|
||||||
|
affected.update(inst_tester.reverse_dependencies_of(old_pkg_id))
|
||||||
affected.update(inst_tester.negative_dependencies_of(old_pkg_id))
|
affected.update(inst_tester.negative_dependencies_of(old_pkg_id))
|
||||||
inst_tester.remove_testing_binary(old_pkg_id)
|
inst_tester.remove_testing_binary(old_pkg_id)
|
||||||
elif hint_undo:
|
elif hint_undo:
|
||||||
@ -2230,7 +2226,6 @@ class Britney(object):
|
|||||||
if not equivalent_replacement:
|
if not equivalent_replacement:
|
||||||
# all the reverse dependencies are affected by the change
|
# all the reverse dependencies are affected by the change
|
||||||
affected.add(updated_pkg_id)
|
affected.add(updated_pkg_id)
|
||||||
affected.update(inst_tester.reverse_dependencies_of(updated_pkg_id))
|
|
||||||
affected.update(inst_tester.negative_dependencies_of(updated_pkg_id))
|
affected.update(inst_tester.negative_dependencies_of(updated_pkg_id))
|
||||||
|
|
||||||
# add/update the source package
|
# add/update the source package
|
||||||
|
Loading…
x
Reference in New Issue
Block a user