[debian-edu-commits] debian-edu/ 01/01: Clean up code diverting tasksel tests, remove redundant code.
Petter Reinholdtsen
pere at moszumanska.debian.org
Thu Sep 25 11:00:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository debian-edu-config.
commit b011d32f1327b8471b82bdbdbb7ac7b9fdbeb789
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Thu Sep 25 13:00:25 2014 +0200
Clean up code diverting tasksel tests, remove redundant code.
* Remove redundant code to divert the tasksel tests and use a common
implementation in /usr/lib/education-tasks/edu-tasksel-setup from
the education-tasks package instead.
* Fix bug in debian-edu-bless failing to clean up the tasksel test
diverts if the installation succeeds.
---
debian/changelog | 10 ++++++
share/debian-edu-config/d-i/finish-install | 21 +++----------
share/debian-edu-config/d-i/pre-pkgsel | 26 ++--------------
share/debian-edu-config/tools/debian-edu-bless | 42 ++------------------------
4 files changed, 20 insertions(+), 79 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e97740e..5770a2b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+debian-edu-config (1.805) UNRELEASED; urgency=low
+
+ * Remove redundant code to divert the tasksel tests and use a common
+ implementation in /usr/lib/education-tasks/edu-tasksel-setup from
+ the education-tasks package instead.
+ * Fix bug in debian-edu-bless failing to clean up the tasksel test
+ diverts if the installation succeeds.
+
+ -- Petter Reinholdtsen <pere at debian.org> Thu, 25 Sep 2014 09:30:23 +0200
+
debian-edu-config (1.804) unstable; urgency=high
* Fix typo in d-i/finish-install, replace non-existing error function
diff --git a/share/debian-edu-config/d-i/finish-install b/share/debian-edu-config/d-i/finish-install
index 6ff42f0..25d4c8b 100644
--- a/share/debian-edu-config/d-i/finish-install
+++ b/share/debian-edu-config/d-i/finish-install
@@ -13,22 +13,6 @@ log() {
logger -t debian-edu-config-finish-install "$@"
}
-# Clean up changes done to tasksel in pre-pkgsel and go back to the
-# default behavior.
-remove_tasksel_overrides() {
- for test in desktop new-install ; do
- file=/usr/lib/tasksel/tests/$test
- if [ -x /target$file.edu ] ; then
- rm /target$file
- chroot /target dpkg-divert --package debian-edu-install \
- --rename --quiet --remove $file
- rm /target$file.edu
- else
- log "error: missing divert for $file."
- fi
- done
-}
-
# Make sure any dhclient processes started in pre-pkgsel is stopped to
# make sure /var/ is umounted and clean on first boot.
deconfigure_network() {
@@ -87,7 +71,10 @@ in-target cfengine-debian-edu -D installation || true
edu-etcvcs commit
-remove_tasksel_overrides
+# Clean up changes done to tasksel in pre-pkgsel and go back to the
+# default behavior.
+in-target /usr/lib/education-tasks/edu-tasksel-setup teardown
+
preserve_network_interfaces
deconfigure_network
diff --git a/share/debian-edu-config/d-i/pre-pkgsel b/share/debian-edu-config/d-i/pre-pkgsel
index d508221..c298731 100644
--- a/share/debian-edu-config/d-i/pre-pkgsel
+++ b/share/debian-edu-config/d-i/pre-pkgsel
@@ -16,28 +16,6 @@ error() {
logger -t debian-edu-config-pre-pkgsel "error: $*"
}
-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&/' \
- < /target/usr/lib/tasksel/tests/desktop \
- > /target/usr/lib/tasksel/tests/desktop.edu
- chmod 755 /target/usr/lib/tasksel/tests/desktop.edu
- chroot /target dpkg-divert --package debian-edu-install --rename --quiet \
- --add /usr/lib/tasksel/tests/desktop
- ln -sf ./desktop.edu /target/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&/' \
- < /target/usr/lib/tasksel/tests/new-install \
- > /target/usr/lib/tasksel/tests/new-install.edu
- chmod 755 /target/usr/lib/tasksel/tests/new-install.edu
- chroot /target dpkg-divert --package debian-edu-install --rename --quiet \
- --add /usr/lib/tasksel/tests/new-install
- ln -sf ./new-install.edu /target/usr/lib/tasksel/tests/new-install
-}
-
# FIXME Rewrite function/subsystem to allow IP numbers and subnet
# information to be configured at install time.
configure_network() {
@@ -326,7 +304,9 @@ create_initial_localadmin_user() {
db_get debian-edu-install/profile
PROFILE="$RET"
-setup_tasksel_overrides
+# Modify tasksel tests so the normal Debian desktop profiles are not
+# installed.
+in-target /usr/lib/education-tasks/edu-tasksel-setup setup
edu-etcvcs commit
diff --git a/share/debian-edu-config/tools/debian-edu-bless b/share/debian-edu-config/tools/debian-edu-bless
index fb86e57..76ba617 100644
--- a/share/debian-edu-config/tools/debian-edu-bless
+++ b/share/debian-edu-config/tools/debian-edu-bless
@@ -71,42 +71,6 @@ if [ 0 -ne $(id -u) ] ; then
exit 1
fi
-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
-}
-
apt_get_harder() {
aptcmd="$1"
# First download only, to detect problems with the network.
@@ -160,7 +124,7 @@ apt_get_harder "apt-get install -y debian-edu-install"
echo debian-edu-install debian-edu-install/profile multiselect "$PROFILE"
echo tasksel tasksel/desktop string "$DESKTOP"
) | debconf-set-selections
-setup_tasksel_overrides
+/usr/lib/education-tasks/edu-tasksel-setup setup
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
@@ -172,9 +136,9 @@ tasksel --new-install --list-tasks
aptcmd=$(tasksel --new-install -t | sed 's/debconf-apt-progress -- //')
if DEBIAN_PRIORITY=critical apt_get_harder "$aptcmd" ; then
- :
+ /usr/lib/education-tasks/edu-tasksel-setup teardown
else
- remove_tasksel_overrides
+ /usr/lib/education-tasks/edu-tasksel-setup teardown
echo "error: installing packages failed"
exit 1
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list