[debian-edu-commits] r80025 - branches/wheezy/debian-edu-config/share/debian-edu-config/tools

pere at alioth.debian.org pere at alioth.debian.org
Wed May 8 14:37:03 UTC 2013


Author: pere
Date: 2013-05-08 14:37:03 +0000 (Wed, 08 May 2013)
New Revision: 80025

Modified:
   branches/wheezy/debian-edu-config/share/debian-edu-config/tools/bless-debian
Log:
Fix the fixme in bless-debian.

Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/tools/bless-debian
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/tools/bless-debian	2013-05-08 14:11:53 UTC (rev 80024)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/bless-debian	2013-05-08 14:37:03 UTC (rev 80025)
@@ -12,6 +12,42 @@
 
 set -e
 
+setup_tasksel_overrides() {
+    # Modify tasksels desktop test so the normal Debian desktop
+    # profiles are not installed. Use dpkg-divert to to switch to our
+    # version
+    sed -e 's/if desktop_hardware/# Do not install a desktop - added by debian-edu-install\nunmark\n\n&/' \
+        < /usr/lib/tasksel/tests/desktop \
+        > /usr/lib/tasksel/tests/desktop.edu
+    chmod 755 /usr/lib/tasksel/tests/desktop.edu
+    dpkg-divert --package debian-edu-install --rename --quiet \
+        --add /usr/lib/tasksel/tests/desktop
+    ln -sf ./desktop.edu /usr/lib/tasksel/tests/desktop
+
+    # And for the standard system task too
+    sed -e 's/^case/# Do not install standard system task - added by debian-edu-install\nexit 3\n\n&/' \
+        < /usr/lib/tasksel/tests/new-install \
+        > /usr/lib/tasksel/tests/new-install.edu
+    chmod 755 /usr/lib/tasksel/tests/new-install.edu
+    dpkg-divert --package debian-edu-install --rename --quiet \
+        --add /usr/lib/tasksel/tests/new-install
+    ln -sf ./new-install.edu /usr/lib/tasksel/tests/new-install
+}
+
+remove_tasksel_overrides() {
+    for test in desktop new-install ; do
+        file=/usr/lib/tasksel/tests/$test
+        if [ -x $file.edu ] ; then
+            rm $file
+            dpkg-divert --package debian-edu-install \
+                --rename --quiet --remove $file
+            rm $file.edu
+        else
+            error "Missing divert for $file."
+        fi
+    done
+}
+
 # 0. Install etckeeper, to keep track of changes in /etc/ (optional,
 #    highly recommended)
 apt-get install -y etckeeper
@@ -42,12 +78,12 @@
 #    our configuration..
 apt-get install -y debian-edu-install
 
-# 4. Run tasksel to install packages according to the profile specified
-#    in the config above
-# FIXME should divert /usr/lib/tasksel/tests/desktop and new-install
-# during the tasksel run to avoid having to manually deselect a few
-# options.
+# 4. Run tasksel to install packages according to the profile
+#    specified in the config above, overriding some of the Debian
+#    automation machinery.
+setup_tasksel_overrides
 tasksel --new-install
+remove_tasksel_overrides
 
 # 5. Run cfengine to configure everything that could not be done using
 #    preseeding.




More information about the debian-edu-commits mailing list