From 09c49937040b8c4d3dfa18683ef277e481a21b1c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 17 Sep 2014 22:38:44 +0200 Subject: [PATCH] Do our best to make sure aptitude is installed in chroot There seems to be a change in Debian (jessie) causing aptitude to no longer be present in debootstrapped systems by default any longer. By setting $FAI_DEBOOTSTRAP_OPTS accordingly we include it in its default package selection though. If it still shouldn't be present we explicitely try to install it through the updatebase.GRMLBASE hook script. --- etc/grml/fai/config/hooks/updatebase.GRMLBASE | 5 +++++ grml-live | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index b1c22e0..d19c4e2 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -72,5 +72,10 @@ fcopy -i -B -v -r /etc/apt # install Grml gpg key: $ROOTCMD apt-key add /etc/apt/grml.key +if ! $ROOTCMD test -x /usr/bin/aptitude ; then + echo "aptitude binary is not available, installing to make sure further FAI actions continue to work" + $ROOTCMD apt-get -y install aptitude +fi + ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2 diff --git a/grml-live b/grml-live index 90f6438..fc6292f 100755 --- a/grml-live +++ b/grml-live @@ -635,7 +635,7 @@ if [ -z "$FAI_DEBOOTSTRAP" ] ; then fi if [ -z "$FAI_DEBOOTSTRAP_OPTS" ] ; then - FAI_DEBOOTSTRAP_OPTS="--exclude=info,tasksel,tasksel-data --arch $ARCH" + FAI_DEBOOTSTRAP_OPTS="--exclude=info,tasksel,tasksel-data --include=aptitude --arch $ARCH" fi # create backup of old (not yet automatically generated) config file -- 2.1.4