[debian-edu-commits] debian-edu/ 01/01: Merged scripts install-missing-* into install-missing-taskpkgs, adjusted Makefile and changelog.

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Sun Mar 15 12:53:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch upgrade-tmp
in repository debian-edu-config.

commit 4f0c51d48e3b79181d600ff938b17c53fb1f7133
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sun Mar 15 13:51:31 2015 +0100

    Merged scripts install-missing-* into install-missing-taskpkgs, adjusted Makefile and changelog.
---
 Makefile                                           |  1 -
 debian/changelog                                   | 10 +--
 .../tools/install-missing-chroot-taskpkgs          | 84 ----------------------
 .../tools/install-missing-taskpkgs                 | 18 +++++
 4 files changed, 23 insertions(+), 90 deletions(-)

diff --git a/Makefile b/Makefile
index 4d4f967..be58218 100644
--- a/Makefile
+++ b/Makefile
@@ -395,7 +395,6 @@ install: install-testsuite
 		share/debian-edu-config/tools/wpad-extract \
 		share/debian-edu-config/tools/debian-edu-dovecot-create-cert \
 		share/debian-edu-config/tools/install-missing-taskpkgs \
-		share/debian-edu-config/tools/install-missing-chroot-taskpkgs \
 		share/debian-edu-config/ltspfs-mounter-kde \
 		share/ltsp/get-ldap-ltsp-config \
 		share/ltsp/init-ltsp.d/08-edu-hostname \
diff --git a/debian/changelog b/debian/changelog
index 299cd61..e90b390 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,11 +8,11 @@ debian-edu-config (1.818) UNRELEASED; urgency=medium
     - remove 'apt-get autoremove -y' from cf/cf.apt.
     - add param '--auto-remove' to all apt-get purge commands
       in cf/cf.ldapclient (Closes: #779646).
-  * share/d-e-c/tools: Add scripts 'install-missing-taskpkgs' and
-    'install-missing-chroot-taskpkgs'; they do what their names tell and
-    are esp. useful after distribution upgrade when packages from the
-    task files are missing due to meta-packages not allowing to define
-    real Depends. (Closes: #779644, #779647, #779648).
+  * share/d-e-c/tools: Add script 'install-missing-taskpkgs'; it does
+    what the name tells and is esp. useful after distribution upgrade
+    when packages from the task files are missing due to meta-packages
+    not allowing to define real Depends.
+    (Closes: #779644, #779647, #779648).
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Tue, 10 Mar 2015 18:23:11 +0100
 
diff --git a/share/debian-edu-config/tools/install-missing-chroot-taskpkgs b/share/debian-edu-config/tools/install-missing-chroot-taskpkgs
deleted file mode 100755
index 0d646dc..0000000
--- a/share/debian-edu-config/tools/install-missing-chroot-taskpkgs
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh -e
-#
-# Based upon testsuite/taskpkgs
-#
-# Make sure the correct profile packages are installed in the LTSP chroot.
-# Once this is done, unwanted packages are removed including some of the just
-# installed ones. Smarter way to get the right package subset would be nice.
-
-if [ ! -f /etc/lts.conf ] ; then
-     echo ""
-     echo "$0 is only useful in LTSP chroots, exiting."
-     echo ""
-     echo "Usage: ltsp-chroot -m -a (i386|amd64) $0"
-     echo ""
-     exit 0
-fi
-
-installed="$(dpkg --get-selections | awk '/\tinstall$/ {print $1}')"
-
-deb_installed() {
-    echo $installed | grep -qw $1
-}
-
-check_installed() {
-    deb=$1
-    if ! deb_installed "$deb" ; then
-         echo "$0: Package $deb is missing, installing it now."
-         apt-get -q -y install $deb
-    fi
-}
-
-check_installed_task() {
-    task=$1
-    found=false
-    for deb in $(tasksel --task-packages $task); do
-        found=true
-        if ! deb_installed "$deb" ; then
-             echo "$0: Package $deb is missing, installing it now."
-             apt-get -q -y install $deb
-        fi
-    done
-    if [ false = $found ] ; then
-            echo "error: $0: Task $task is empty, tasksel --task-packages $task returns nothing!"
-            retval=1
-    fi
-}
-
-if test -r /etc/debian-edu/config ; then
-    . /etc/debian-edu/config
-fi
-
-# Check if the desktop type selection worked
-check_desktop_task() {
-    desktop=$(debconf-show tasksel |tr -d "*" |awk '/tasksel\/desktop/ {print $2}')
-    pkg="education-desktop-$desktop"
-    if deb_installed "$pkg" ; then
-	echo "$0: Desktop package $pkg is installed."
-    else
-	echo "error: $0: Desktop package $pkg is not installed."
-    fi
-}
-
-retval=0
-
-apt-get update
-
-check_installed education-common
-check_installed education-tasks
-check_installed_task education-workstation
-check_desktop_task
-
-# FIXME: Check if this list is still valid for stretch.
-# Some packages are unwanted for the LTSP chroot (list from 032-edu-pkgs),
-# so remove them. Remove as well automatically installed packages.
-unwanted="cups cups-browsed readahead readahead-fedora hdparm hddtemp lvm2 \
-munin-node xfs resolvconf network-manager wpasupplicant openvpn ppp \
-modemmanager consolekit cups network-manager-openvpn network-manager-pptp \
-network-manager-vpnc popularity-contest system-config-lvm"
-
-for i in $(echo $unwanted); do
-     apt-get --auto-remove -y purge $i
-done
-
-exit $retval
diff --git a/share/debian-edu-config/tools/install-missing-taskpkgs b/share/debian-edu-config/tools/install-missing-taskpkgs
index 49d1bd2..f2cc1e2 100755
--- a/share/debian-edu-config/tools/install-missing-taskpkgs
+++ b/share/debian-edu-config/tools/install-missing-taskpkgs
@@ -3,6 +3,9 @@
 # Based upon testsuite/taskpkgs
 #
 # Make sure the correct profile packages are installed.
+# Once this is done, unwanted packages are removed including some of
+# the just installed ones if this script is called inside LTSP chroots.
+# Smarter way to get the right package subset would be nice.
 
 installed="$(dpkg --get-selections | awk '/\tinstall$/ {print $1}')"
 
@@ -89,4 +92,19 @@ for value in `echo $PROFILE |sed 's/ /-/g' | sed 's/,-/ /g'`; do
     esac
 done
 
+# FIXME: Check if this list is still valid for stretch.
+# Some packages are unwanted for the LTSP chroot (list from 032-edu-pkgs),
+# so remove them. Remove as well automatically installed packages.
+unwanted="cups cups-browsed readahead readahead-fedora hdparm hddtemp lvm2 \
+munin-node xfs resolvconf network-manager wpasupplicant openvpn ppp \
+modemmanager consolekit cups network-manager-openvpn network-manager-pptp \
+network-manager-vpnc popularity-contest system-config-lvm"
+
+# Remove only if called inside LTSP chroot
+if [ -f /etc/lts.conf ] ; then
+     for i in $(echo $unwanted); do
+          apt-get --auto-remove -y purge $i
+     done
+fi
+
 exit $retval

-- 
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