[Cdd-commits] r795 - in cdd/trunk/cdd: debian share/menu

CDD Subversion Commit noreply at alioth.debian.org
Wed Jun 4 20:00:11 UTC 2008


Author: tille
Date: Wed Jun  4 20:00:10 2008
New Revision: 795

Modified:
   cdd/trunk/cdd/debian/changelog
   cdd/trunk/cdd/share/menu/cdd-menu
Log:
Work around for not yet available /etc/cdd/cdd.conf (#484167).


Modified: cdd/trunk/cdd/debian/changelog
==============================================================================
--- cdd/trunk/cdd/debian/changelog	(original)
+++ cdd/trunk/cdd/debian/changelog	Wed Jun  4 20:00:10 2008
@@ -11,6 +11,14 @@
     to build the cdd-common or cdd-dev package, but it makes perfectly
     sense to build with the same debhelper version as cdd-dev will
     finally depend from
+  * share/menu/cdd-menu: verify that /etc/cdd/cdd.conf exists before
+    sourcing it because since menu 2.1.39 supports triggers on
+    /usr/{lib,share}/menu update-menus is called on every touch of
+    these directory and because we have no safe way to ensure that
+    /etc/cdd/cdd.conf is unpackaged before cdd-menu we have to work
+    around the not yet available config file.  Even if I regard this
+    as a bug in menu, we have to handle this here vor the moment.
+    Closes: #484167
 
  -- Andreas Tille <tille at debian.org>  Mon, 05 May 2008 12:56:37 +0200
 

Modified: cdd/trunk/cdd/share/menu/cdd-menu
==============================================================================
--- cdd/trunk/cdd/share/menu/cdd-menu	(original)
+++ cdd/trunk/cdd/share/menu/cdd-menu	Wed Jun  4 20:00:10 2008
@@ -7,8 +7,18 @@
 
 CONFBASE=${CONFBASE:-/etc/cdd}
 
-# read generic CDD conf
-. ${CONFBASE}/cdd.conf
+# read generic CDD conf ... in case it exists
+# Since menu 2.1.39 triggers are used to run update-menus for every change
+# in /usr/{lib,share}/menu - which fails finding ${CONFBASE}/cdd.conf in
+# case you are installing cdd-common the first time.  I do not regard this
+# as a reasonable behaviour because it is a real performance loss and
+# obviousely error prone (for instance in case of cdd-common (see #484167)
+# but we have to deal with this somehow
+if [ -s "${CONFBASE}/cdd.conf" ] ; then
+    . ${CONFBASE}/cdd.conf
+else
+    exit 0
+fi
 
 CDDUSER=`whoami`
 



More information about the Cdd-commits mailing list