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.
This commit is contained in:
Philip Roche 2023-09-15 11:59:06 +01:00
parent e601fd6fc6
commit 0a1e1cc0a7
2 changed files with 10 additions and 4 deletions

6
debian/changelog vendored
View File

@ -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 <phil.roche@ubuntu.com> 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

View File

@ -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)" ]