Avoid problematic grub-efi-amd64-signed package on Ubuntu

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-10-04 15:00:16 +01:00 committed by Pedro Algarvio
parent a7bcc6f90a
commit a932628c0c

View file

@ -49,6 +49,18 @@ def _system_up_to_date(
grains,
shell,
):
if grains["os"] == "Ubuntu" and grains["osarch"] == "amd64":
# The grub-efi-amd64-signed package seems to be a problem
# right now when updating the system
env = os.environ.copy()
env["DEBIAN_FRONTEND"] = "noninteractive"
ret = shell.run(
"apt-mark",
"hold",
"grub-efi-amd64-signed",
env=env,
)
assert ret.returncode == 0
if grains["os_family"] == "Debian":
ret = shell.run("apt", "update")
assert ret.returncode == 0