From 51fbcc7c7595303dd703d13d18ccab018ec617bf Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 28 Oct 2014 09:00:56 +0100 Subject: [PATCH] Make sure apt caches are up2date before trying to install aptitude Otherwise we might run into: | [...] | 08:54:38 preserving etc/apt/sources.list.d/grml-stable.list | 08:54:39 OK | 08:54:39 aptitude binary is not available, installing to make sure further FAI actions continue to work | 08:54:39 Reading package lists... | 08:54:42 Building dependency tree... | 08:54:42 Package aptitude is not available, but is referred to by another package. | 08:54:42 This may mean that the package is missing, has been obsoleted, or | 08:54:42 is only available from another source | 08:54:42 | 08:54:42 E: Package 'aptitude' has no installation candidate | 08:54:42 updatebase.GRMLBASE FAILED with exit code 100. | 08:54:42 Calling task_updatebase As nowadays - with Debian/jessieu - aptitude no longer is in a base debootstrap chroot. --- etc/grml/fai/config/hooks/updatebase.GRMLBASE | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index d19c4e2..063cae4 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -74,6 +74,7 @@ $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 update $ROOTCMD apt-get -y install aptitude fi -- 2.1.4