Use strings instead of --help to detect support of safe-upgrade inside aptitude
authorMichael Prokop <mika@grml.org>
Mon, 5 Nov 2007 08:55:54 +0000 (09:55 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 5 Nov 2007 08:55:54 +0000 (09:55 +0100)
debian/changelog
etc/grml/fai/config/hooks/instsoft.GRMLBASE

index 359d917..f40b290 100644 (file)
@@ -17,6 +17,8 @@ grml-live (0.0.8) unstable; urgency=low
   * Edit /etc/apt/apt.conf inside
     /etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build only
     once.
+  * Use strings instead of --help to detect support of safe-upgrade
+    inside aptitude, otherwise it might fail due to unavailable shared libs.
   * Configure (enable) apt-listchanges + apt-listbugs via
     /etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
   * Purge removed packages via /etc/grml/fai/grml/grml_cleanup_chroot
index 1b97e9b..1e5ce06 100755 (executable)
@@ -43,7 +43,7 @@ if [ "$FAI_ACTION" = "softupdate" ] ; then
    # FAI softupdate does not execute upgrade, so let's do it on our own:
    $ROOTCMD apt-get update
    if [ -x $target/usr/bin/aptitude ] ; then
-      if $target/usr/bin/aptitude --help | grep safe-upgrade ; then
+      if strings $target/usr/bin/aptitude | grep safe-upgrade 1>/dev/null ; then
          $ROOTCMD aptitude safe-upgrade
       else
          $ROOTCMD aptitude upgrade