From 0a1e1cc0a757bed5b50547de27454778f3bc98fd Mon Sep 17 00:00:00 2001 From: Philip Roche Date: Fri, 15 Sep 2023 11:59:06 +0100 Subject: [PATCH] fix: ensure minimize-manual script uses passed in argument for all commands (LP: #2036198) minimize-manual takes an argument of the path to the chroot but of the 3 commands that are run the argument is only used twice and with the third hardcoding "chroot" as the path to the chroot. Thankfully "chroot" has been the patch passed in for the current uses of minimize-manual but this could cause issues later if that were to change. This commit resolves the problem preventing future issues. --- debian/changelog | 6 ++++++ minimize-manual | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 815c5d77..45729335 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.37) mantic; urgency=medium + + * fix: ensure minimize-manual script uses passed in argument for all commands (LP: #2036198) + + -- Philip Roche Fri, 15 Sep 2023 11:58:23 +0100 + livecd-rootfs (23.10.36) mantic; urgency=medium * Since we restored the minimal layer, we also need to adjust all hook diff --git a/minimize-manual b/minimize-manual index 393ec2cb..eac75e95 100755 --- a/minimize-manual +++ b/minimize-manual @@ -7,10 +7,10 @@ set -e -chroot=$1 +chroot_directory=$1 -auto_packages=$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot) +auto_packages=$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot_directory) if [ -n "$auto_packages" ]; then - chroot chroot apt-mark auto $auto_packages + chroot $chroot_directory apt-mark auto $auto_packages fi -[ -z "$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot 2> /dev/null)" ] +[ -z "$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot_directory 2> /dev/null)" ]