mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +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 = []
|
held_packages = []
|
||||||
|
try:
|
||||||
for package in packages:
|
for package in packages:
|
||||||
current_hold = subprocess.check_output(
|
current_hold = subprocess.check_output(
|
||||||
['apt-mark', 'showhold', package])
|
['apt-mark', 'showhold', package])
|
||||||
@ -485,7 +486,7 @@ def apt_hold(packages):
|
|||||||
held_packages.append(package)
|
held_packages.append(package)
|
||||||
|
|
||||||
yield held_packages
|
yield held_packages
|
||||||
|
finally:
|
||||||
for package in held_packages:
|
for package in held_packages:
|
||||||
subprocess.check_call(['apt-mark', 'unhold', package])
|
subprocess.check_call(['apt-mark', 'unhold', package])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user