[debian-edu-commits] debian-edu/ 64/183: Xsession.d scripts are seen as conffiles -> they remain on the system when package is removed (not purged) -> they need to not cause X to break when run after the package is removed

Alexander Alemayhu ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:34 UTC 2014


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

ccscanf-guest pushed a commit to branch master
in repository desktop-profiles.

commit d18df2b861850f234ee15ec21e60535f22d125d8
Author: Bart Cornelis <cobaco at linux.be>
Date:   Sun May 15 22:52:51 2005 +0000

    Xsession.d scripts are seen as conffiles
    -> they remain on the system when package is removed (not purged)
    -> they need to not cause X to break when run after the package is removed
---
 20desktop-profiles_activateDesktopProfiles | 13 ++++++++++---
 debian/changelog                           |  8 ++++++--
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/20desktop-profiles_activateDesktopProfiles b/20desktop-profiles_activateDesktopProfiles
index 7ad26d4..4a48800 100644
--- a/20desktop-profiles_activateDesktopProfiles
+++ b/20desktop-profiles_activateDesktopProfiles
@@ -20,9 +20,15 @@
 LIB=/usr/share/desktop-profiles/listingmodule;
 if (test -r $LIB); then
   . $LIB;
+  INSTALLED=true;
 else
-  # errormsg is defined in /etc/X11/Xsession, which sources this script
-  errormsg "Shell library $LIB is missing! No desktop profiles will be activated.";
+  # test for shell-library if absent then either:
+  # - the package installation is corrupt
+  # - the pacakge is removed (this file is left as it's in /etc/ and
+  #   thus treated as a conffile
+  # We'll assume the latter.
+  echo "Shell library $LIB is missing -> assuming desktop-profiles is removed (but not purged)" >> $ERRFILE;
+  INSTALLED=false
 fi;
 
 #########################################################################
@@ -195,7 +201,7 @@ activate_GCONF () {
 #####################
 # Start of execution
 #####################
-
+if (test $INSTALLED = true); then
   #################################
   # Check if user set any defaults
   #################################
@@ -232,3 +238,4 @@ activate_GCONF () {
     # cleanup the tempfiles
     rm $GCONF_FILE 
   fi;  
+fi;  
diff --git a/debian/changelog b/debian/changelog
index 1e285e2..ee9ca10 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
-desktop-profiles (1.4.4) UNRELEASED; urgency=low
+desktop-profiles (1.4.4) unstable; urgency=low
 
   * Added lintian overrides file to eliminate spurious lintian warnings
     (Xsession.d scripts (see also bug #309203) and shell libraries are ment to
     be sourced not executed, hence the script-not-executable warning is
     wrong)
+  * Adapted Xsession.d script so it doesn't do anything when the pacakge is
+    removed (the Xsesion.d script is under /etc/, thus a conffile, and hence
+    left on the system unless the package is purged), prevents X breakage
+    after package removal, thanks to zufus @ debian . org for noticing.
 
- -- Bart Cornelis (cobaco) <cobaco at linux.be>  Sun, 15 May 2005 17:23:54 +0200
+ -- Bart Cornelis (cobaco) <cobaco at linux.be>  Mon, 16 May 2005 00:21:06 +0200
 
 desktop-profiles (1.4.3) unstable; urgency=low
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/desktop-profiles.git



More information about the debian-edu-commits mailing list