From eac8ea8bd6b7ff22fbe124b4c50b90b7414a9b4b Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 22 Nov 2021 19:59:43 -0500 Subject: grub_plugin.py: run apt-get update before installing grub This fixes build failures where no packages are installed by vmdb2 (and so there is no local package metadata for apt-get to read) before the grub plugin is executed. This can be the case when an `unpack-rootfs` build step comes after all of steps that install packages. --- vmdb/plugins/grub_plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vmdb/plugins/grub_plugin.py b/vmdb/plugins/grub_plugin.py index 7206cd5..830d4c3 100644 --- a/vmdb/plugins/grub_plugin.py +++ b/vmdb/plugins/grub_plugin.py @@ -290,6 +290,7 @@ class GrubStepRunner(vmdb.StepRunnerInterface): def install_package(self, chroot, package): env = os.environ.copy() env["DEBIAN_FRONTEND"] = "noninteractive" + vmdb.runcmd_chroot(chroot, ["apt-get", "update"], env=env) vmdb.runcmd_chroot( chroot, ["apt-get", "-y", "--no-show-progress", "install", package], env=env ) -- cgit v1.2.1