From 45544d50385b19093f6e9f916ee184c7b11c8f38 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Tue, 21 Mar 2023 15:16:10 +0000 Subject: [PATCH] Fix ubuntu-minimal to run autoremove The "ubuntu" target had a post-install 99-autoremove task that removed unnecessary dependency packages, but the "ubuntu-minimal" target does not. This patch moves the 99-autoremove post-install task from the "ubuntu" target to the "ubuntu-common" target so that both will run an autoremove at the end of the image build. For the Octavia amphora image, this saved about 1GB in the image by removing build only package dependencies. Closes-Bug: #2012406 Change-Id: I4592e3bd502045fa89203c075d3ea8f632e77177 --- .../{ubuntu => ubuntu-common}/post-install.d/99-autoremove | 0 ...untu-minimal-not-running-autoremove-7a4e31de2a525f46.yaml | 5 +++++ 2 files changed, 5 insertions(+) rename diskimage_builder/elements/{ubuntu => ubuntu-common}/post-install.d/99-autoremove (100%) create mode 100644 releasenotes/notes/Fix-ubuntu-minimal-not-running-autoremove-7a4e31de2a525f46.yaml diff --git a/diskimage_builder/elements/ubuntu/post-install.d/99-autoremove b/diskimage_builder/elements/ubuntu-common/post-install.d/99-autoremove similarity index 100% rename from diskimage_builder/elements/ubuntu/post-install.d/99-autoremove rename to diskimage_builder/elements/ubuntu-common/post-install.d/99-autoremove diff --git a/releasenotes/notes/Fix-ubuntu-minimal-not-running-autoremove-7a4e31de2a525f46.yaml b/releasenotes/notes/Fix-ubuntu-minimal-not-running-autoremove-7a4e31de2a525f46.yaml new file mode 100644 index 000000000..ce2585277 --- /dev/null +++ b/releasenotes/notes/Fix-ubuntu-minimal-not-running-autoremove-7a4e31de2a525f46.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixed the ubuntu-minimal target to also run autoremove at the end of an + image build.