mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
action_utils: Ensure that package are unheld if dist upgrade fails
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
3aff47039f
commit
0022dc5889
@ -475,6 +475,7 @@ def apt_hold(packages):
|
||||
|
||||
"""
|
||||
held_packages = []
|
||||
try:
|
||||
for package in packages:
|
||||
current_hold = subprocess.check_output(
|
||||
['apt-mark', 'showhold', package])
|
||||
@ -485,7 +486,7 @@ def apt_hold(packages):
|
||||
held_packages.append(package)
|
||||
|
||||
yield held_packages
|
||||
|
||||
finally:
|
||||
for package in held_packages:
|
||||
subprocess.check_call(['apt-mark', 'unhold', package])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user