[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Improve share/ltsp/plugin/ltsp-build-client/Debian-custom/032-edu-pkgs

WolfgangSchweer gitlab at salsa.debian.org
Mon Jan 28 20:27:00 GMT 2019


WolfgangSchweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
b0439b86 by Wolfgang Schweer at 2019-01-28T20:25:45Z
Improve share/ltsp/plugin/ltsp-build-client/Debian-custom/032-edu-pkgs

Generate list of actually installed packages intended to be purged.
Purge selected packages to make LTSP clients work.

- - - - -


2 changed files:

- debian/changelog
- share/ltsp/plugins/ltsp-build-client/Debian-custom/032-edu-pkgs


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+debian-edu-config (2.10.58) UNRELEASED; urgency=medium
+
+  * Improve share/ltsp/plugin/ltsp-build-client/Debian-custom/032-edu-pkgs:
+    - Generate list of actually installed packages intended to be purged.
+    - Purge selected packages to make LTSP clients work.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Mon, 28 Jan 2019 21:16:18 +0100
+
 debian-edu-config (2.10.57) unstable; urgency=medium
 
   * 032-edu-pkgs: fix typo.


=====================================
share/ltsp/plugins/ltsp-build-client/Debian-custom/032-edu-pkgs
=====================================
@@ -173,6 +173,7 @@ after_install_diskless_workstation() {
 
 finalization_diskless_workstation() {
     local PURGE=""
+    local PURGE2=""
     # Get rid of lvm2, as it causes the shutdown to hang.
     PURGE="lvm2"
 
@@ -201,8 +202,15 @@ finalization_diskless_workstation() {
     # Probably not very useful without a disk
     PURGE="$PURGE hdparm hddtemp"
 
+    # Match only installed packages to avoid breaking the installation.
+    for p in $(echo $PURGE) ; do
+        if in_target dpkg -l $p 2>/dev/null | tail -1 | grep -q  ^ii ; then
+            PURGE2="$PURGE2 $p"
+        fi
+    done
+
     # purge them alltogether
-    in_target apt-get -y purge "$PURGE" || true
+    in_target apt-get -y purge $PURGE2
 
     # Remove dependencies pulled in by removed packages
     in_target apt-get -y --purge autoremove



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/b0439b86a7626fd2367e0708c84bb047fe1321fb

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/b0439b86a7626fd2367e0708c84bb047fe1321fb
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20190128/09c31fb8/attachment-0001.html>


More information about the debian-edu-commits mailing list