diff options
author | Andy Piper <andy.piper@arcticwolf.com> | 2021-11-22 19:59:43 -0500 |
---|---|---|
committer | Andy Piper <andy.piper@arcticwolf.com> | 2021-11-22 19:59:43 -0500 |
commit | eac8ea8bd6b7ff22fbe124b4c50b90b7414a9b4b (patch) | |
tree | 0ff4e4f502875e143a8d286a83414c9f5011f901 | |
parent | 23b3f3f9c6552b926446ce6d12eea23342261127 (diff) | |
download | vmdb2-eac8ea8bd6b7ff22fbe124b4c50b90b7414a9b4b.tar.gz |
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.
-rw-r--r-- | vmdb/plugins/grub_plugin.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 ) |