Integrated grml_cleanup_chroot.deborphan
authorMichael Prokop <devnull@localhost>
Sun, 16 Dec 2007 18:01:13 +0000 (19:01 +0100)
committerMichael Prokop <devnull@localhost>
Sun, 16 Dec 2007 18:01:13 +0000 (19:01 +0100)
etc/grml/fai/config/hooks/instsoft.GRMLBASE
etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build
etc/grml/fai/grml/grml_cleanup_chroot.deborphan [new file with mode: 0755]

index ecf6772..b5ac237 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Sun Nov 25 18:28:54 CET 2007 [mika]
+# Latest change: Sun Dec 16 18:31:59 CET 2007 [mika]
 ################################################################################
 
 set -u
 ################################################################################
 
 set -u
@@ -87,6 +87,7 @@ echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/a
 
 # Recommends just pull in way tooooo much packages, so disable it:
 echo "APT::Install-Recommends "false"; // added by grml-live"   >> $target/etc/apt/apt.conf
 
 # Recommends just pull in way tooooo much packages, so disable it:
 echo "APT::Install-Recommends "false"; // added by grml-live"   >> $target/etc/apt/apt.conf
+echo "Aptitude::Recommends-Important "false"; // added by grml-live" >> $target/etc/apt/apt.conf
 
 # install grml keys:
 gpg --keyserver subkeys.pgp.net      --recv-keys F61E2E7CECDEA787 || \
 
 # install grml keys:
 gpg --keyserver subkeys.pgp.net      --recv-keys F61E2E7CECDEA787 || \
index 18b5d61..4627529 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Sun Dec 09 18:46:19 CET 2007 [mika]
+# Latest change: Sun Dec 16 17:37:09 CET 2007 [mika]
 ################################################################################
 
 set -e
 ################################################################################
 
 set -e
@@ -30,6 +30,15 @@ if ifclass REMOVE_DOCS ; then
    rm $target/root/grml_cleanup_chroot.remove_docs
 fi
 
    rm $target/root/grml_cleanup_chroot.remove_docs
 fi
 
+# drop unnecessary software:
+if ifclass GRML_SMALL || ifclass DEBORPHAN ; then
+   if [ -f /etc/grml/fai/grml/grml_cleanup_chroot.deborphan ] ; then
+      cp /etc/grml/fai/grml/grml_cleanup_chroot.deborphan $target/root/
+      $ROOTCMD  /root/grml_cleanup_chroot.deborphan
+      rm $target/root/grml_cleanup_chroot.deborphan
+   fi
+fi
+
 # misc cleanup:
 if [ -f /etc/grml/fai/grml/grml_cleanup_chroot ] ; then
    cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/
 # misc cleanup:
 if [ -f /etc/grml/fai/grml/grml_cleanup_chroot ] ; then
    cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/
index 9f0ae40..33d9b73 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Mon Nov 12 11:15:56 CET 2007 [mika]
+# Latest change: Sun Dec 16 18:33:15 CET 2007 [mika]
 ################################################################################
 
 set -u
 ################################################################################
 
 set -u
@@ -13,8 +13,9 @@ set -e
 # Restore usual Debian behaviour which has been changed
 # for FAI via /etc/grml/fai/config/hooks/instsoft.GRMLBASE
 if [ -r $target/etc/apt/apt.conf ] ; then
 # Restore usual Debian behaviour which has been changed
 # for FAI via /etc/grml/fai/config/hooks/instsoft.GRMLBASE
 if [ -r $target/etc/apt/apt.conf ] ; then
-   sed -i "s#^Acquire::http::Pipeline-Depth.*#// &#" $target/etc/apt/apt.conf
-   sed -i "s#^APT::Install-Recommends.*#// &#"       $target/etc/apt/apt.conf
+   sed -i "s#^Acquire::http::Pipeline-Depth.*#// &#"  $target/etc/apt/apt.conf
+   sed -i "s#^APT::Install-Recommends.*#// &#"        $target/etc/apt/apt.conf
+   sed -i "s#^Aptitude::Recommends-Important.*#// &#" $target/etc/apt/apt.conf
 fi
 
 # Restore original state from softupdate:
 fi
 
 # Restore original state from softupdate:
diff --git a/etc/grml/fai/grml/grml_cleanup_chroot.deborphan b/etc/grml/fai/grml/grml_cleanup_chroot.deborphan
new file mode 100755 (executable)
index 0000000..bee2917
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Filename:      /etc/grml/fai/grml/grml_cleanup_chroot.deborphan
+# Purpose:       drop as many packages from grml as possible
+# Authors:       (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2.
+# Latest change: Sun Dec 16 18:34:08 CET 2007 [mika]
+################################################################################
+
+apt-get -y --purge remove aptitude
+apt-get -y --purge remove $(deborphan)
+apt-get -y --purge autoremove
+apt-get -y --purge remove $(deborphan)
+
+## END OF FILE #################################################################