mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-23 16:31:32 +00:00
Don't remove package if removal is blocked
Support blocking the removal of a package with a removal hint. This is useful to block an auto-removal. Before this patch, only removals for packages not in unstable could be blocked. Signed-off-by: Ivo De Decker <ivodd@debian.org>
This commit is contained in:
parent
b62a265175
commit
111413fb7b
14
britney.py
14
britney.py
@ -1681,10 +1681,22 @@ class Britney(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# add the removal of the package to upgrade_me and build a new excuse
|
# add the removal of the package to upgrade_me and build a new excuse
|
||||||
upgrade_me_add("-%s" % (src))
|
|
||||||
excuse = Excuse("-%s" % (src))
|
excuse = Excuse("-%s" % (src))
|
||||||
excuse.set_vers(tsrcv, None)
|
excuse.set_vers(tsrcv, None)
|
||||||
excuse.addhtml("Removal request by %s" % (hint.user))
|
excuse.addhtml("Removal request by %s" % (hint.user))
|
||||||
|
# if the removal of the package is blocked, skip it
|
||||||
|
blocked = False
|
||||||
|
for blockhint in self.hints.search('block', package=src, removal=True):
|
||||||
|
excuse.addhtml("Not removing package, due to block hint by %s "
|
||||||
|
"(contact debian-release if update is needed)" % blockhint.user)
|
||||||
|
excuse.addreason("block")
|
||||||
|
blocked = True
|
||||||
|
|
||||||
|
if blocked:
|
||||||
|
excuses[excuse.name] = excuse
|
||||||
|
continue
|
||||||
|
|
||||||
|
upgrade_me_add("-%s" % (src))
|
||||||
excuse.addhtml("Package is broken, will try to remove")
|
excuse.addhtml("Package is broken, will try to remove")
|
||||||
excuse.add_hint(hint)
|
excuse.add_hint(hint)
|
||||||
# Using "PASS" here as "Created by a hint" != "accepted due to hint". In a future
|
# Using "PASS" here as "Created by a hint" != "accepted due to hint". In a future
|
||||||
|
Loading…
x
Reference in New Issue
Block a user