Package: fai-client
Version: 3.2.1
Severity: wishlist

Currently there's a problem with apt/aptitude in Debian/unstable
(see #447960) which causes serious problems in upgrading the base
system. "apt-get dist-upgrade" currently removes aptitude in stage
updatebase and all the following actions therefore fail. As aptitude
handles such situations just fine I suggest to use aptitude for
dist-upgrade if possible.

The attached (verified) patch supports use of aptitude inside
/usr/lib/fai/updatebase and only falls back to apt-get if aptitude
isn't available.

regards,
-mika-
--- /usr/lib/fai/updatebase.orig        2007-10-29 00:12:49.000000000 +0100
+++ /usr/lib/fai/updatebase     2007-10-29 00:13:27.000000000 +0100
@@ -31,7 +31,11 @@
 [ $? -ne 0 ] && yes '' | $ROOTCMD dpkg --configure -a 
 # using the above value, causes an error: "dpkg need action"
 export aptopt=
+if [ -x /usr/bin/aptitude ] ; then
+$ROOTCMD aptitude $aptopt -f -y dist-upgrade </dev/null
+else
 $ROOTCMD apt-get $aptopt -f -y dist-upgrade </dev/null
+fi
 # update dpkg info which packages are available
 tmp=$($ROOTCMD mktemp)
 $ROOTCMD apt-cache dumpavail > $FAI_ROOT/$tmp

Reply via email to