[debian-edu-commits] debian-edu/ 24/183: Gnome doesn't seem to like it overly much when the user sources are in a secondary path file, so change things around so there in the system-wide file

Alexander Alemayhu ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:30 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 0c131bfb561c0a7e7ebde8a92401b05464328b18
Author: Bart Cornelis <cobaco at linux.be>
Date:   Fri Oct 29 23:36:05 2004 +0000

    Gnome doesn't seem to like it overly much when the user sources are in
    a secondary path file, so change things around so there in the system-wide
    file
---
 20desktop-profiles_activateDesktopProfiles | 25 ++++++++++++++++++++----
 debian/changelog                           |  9 ++++++++-
 debian/config                              | 18 +++++++++++------
 debian/postinst                            | 18 +++++++++++------
 default.listing                            |  1 -
 desktop-profiles.7                         |  4 +++-
 path                                       | 31 ++++++++++++++++++------------
 7 files changed, 75 insertions(+), 31 deletions(-)

diff --git a/20desktop-profiles_activateDesktopProfiles b/20desktop-profiles_activateDesktopProfiles
index 462b484..e817b75 100644
--- a/20desktop-profiles_activateDesktopProfiles
+++ b/20desktop-profiles_activateDesktopProfiles
@@ -13,7 +13,7 @@
 PROFILE_DIR="/etc/desktop-profiles";
 
 # Where do we place the generated path file for gnome (if any)
-PROFILE_PATH_FILE="/var/cache/desktop-profiles/${USER}_profiles.path"
+PROFILE_PATH_FILES_DIR="/var/cache/desktop-profiles/"
 
 ######################################################################
 # $1 = requirement
@@ -211,7 +211,24 @@ fi;
 #       contain _only_ that include directive setting everything else up through profiles)
 
 # only generate path files for user if it will be included
-if (grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' /etc/gconf/2/path 2>&1 > /dev/null ) ||
-   (grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' /etc/gconf/1/path 2>&1 > /dev/null ) ; then
-  get_profiles GCONF > $PROFILE_PATH_FILE;
+if (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/2/path 2>&1 > /dev/null ) ||
+   (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/2/path 2>&1 > /dev/null ) ||
+   (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/1/path 2>&1 > /dev/null ) ||
+   (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/1/path 2>&1 > /dev/null ); then
+
+  INCLUDED_HOME=false; 
+  echo "# Generated by desktop-profiles package" > "$PROFILE_PATH_FILES_DIR/${USER}_mandatory.path";
+  echo "# Generated by desktop-profiles package" > "$PROFILE_PATH_FILES_DIR/${USER}_defaults.path";
+  
+  get_profiles GCONF | while read LINE; do
+     if (test "$LINE" != 'xml:readwrite:$(HOME)/.gconf'); then
+       if (test $INCLUDED_HOME = false); then
+         echo $LINE >> "$PROFILE_PATH_FILES_DIR/${USER}_mandatory.path";
+       else	 
+         echo $LINE >> "$PROFILE_PATH_FILES_DIR/${USER}_defaults.path";
+       fi;	 
+     else  
+       INCLUDED_HOME=true;
+     fi  
+  done;
 fi;  
diff --git a/debian/changelog b/debian/changelog
index de8c233..4252051 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,11 @@
-desktop-profiles (1.0-1) UNRELEASED; urgency=low
+desktop-profiles (1.0-2) UNRELEASED; urgency=low
+
+  * GNOME doesn't always like it if user write source is in secondary include
+    , so change it around
+
+ -- Bart Cornelis (cobaco) <cobaco at linux.be>  Sat, 30 Oct 2004 01:09:02 +0200
+
+desktop-profiles (1.0-1) unstable; urgency=low
 
   * Initial Release.
 
diff --git a/debian/config b/debian/config
index 2f66fe9..277bbcb 100755
--- a/debian/config
+++ b/debian/config
@@ -5,10 +5,16 @@
 
 # if gconf path file is present and doesn't include the generated path file
 # ask wether to activate gnome profiles (defaults to no)
-if (test -e /etc/gconf/2/path) && ! (grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' /etc/gconf/2/path > /dev/null); then
-  db_input medium desktop-profiles/replace-gconf-system-wide-path-file || true
-  db_go
-elif (test -e /etc/gconf/1/path) && ! (grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' /etc/gconf/1/path > /dev/null); then
-  db_input medium desktop-profiles/replace-gconf-system-wide-path-file || true
-  db_go
+if (test -e /etc/gconf/2/path) ; then
+  if ! ( (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/2/path > /dev/null) ||
+         (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/2/path > /dev/null) ); then
+    db_input medium desktop-profiles/replace-gconf-system-wide-path-file || true
+    db_go
+  fi;
+elif (test -e /etc/gconf/2/path) ; then
+  if ! ( (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/1/path > /dev/null) ||
+         (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/1/path > /dev/null) ); then
+    db_input medium desktop-profiles/replace-gconf-system-wide-path-file || true
+    db_go
+  fi;
 fi;  
diff --git a/debian/postinst b/debian/postinst
index 0903ac2..1cfced5 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -7,13 +7,19 @@ db_get desktop-profiles/replace-gconf-system-wide-path-file || true
 if (test "$RET" = true); then
   # if gconf 2 path file is present and doesn't include the generated path file
   # then replace path file
-  if (test -e /etc/gconf/2/path) && ! (grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' /etc/gconf/2/path > /dev/null); then
-    mv /etc/gconf/2/path /etc/gconf/2/path.pre-desktop-profiles
-    cp /usr/share/doc/desktop-profiles/examples/path /etc/gconf/2/path
+  if (test -e /etc/gconf/2/path) ; then
+    if ! ( (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/2/path > /dev/null) ||
+           (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/2/path > /dev/null) ); then
+      mv /etc/gconf/2/path /etc/gconf/2/path.pre-desktop-profiles
+      cp /usr/share/doc/desktop-profiles/examples/path /etc/gconf/2/path
+    fi;
   # if gconf 1 path file is present and doesn't include the generated path file
   # then replace path file
-  elif (test -e /etc/gconf/1/path) && ! (grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' /etc/gconf/1/path > /dev/null); then
-    mv /etc/gconf/2/path /etc/gconf/1/path.pre-desktop-profiles
-    cp -f /usr/share/doc/desktop-profiles/examples/path /etc/gconf/1/path
+  elif (test -e /etc/gconf/2/path) ; then
+    if ! ( (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/1/path > /dev/null) ||
+           (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/1/path > /dev/null) ); then
+      mv /etc/gconf/2/path /etc/gconf/1/path.pre-desktop-profiles
+      cp -f /usr/share/doc/desktop-profiles/examples/path /etc/gconf/1/path
+    fi;
   fi;  
 fi;
diff --git a/default.listing b/default.listing
index 0d187c3..2e6b2eb 100644
--- a/default.listing
+++ b/default.listing
@@ -24,7 +24,6 @@ ude-install-dir;/usr/share/ude;;;UDE;Default location of system-wide UDE stuff
 
 gconf-mandatory;xml:readonly:/etc/gconf/gconf.xml.mandatory;101;;GCONF;Configuration source with the mandatory system-wide settings
 gconf-sysadmin-mandatory;include /etc/gconf/2/local-mandatory.path;100;;GCONF;Extra mandatory settings defined by sysadmin
-gconf-user-path;include $(HOME)/.gconf.path;51;;GCONF;Extra configuration sources specified by the user
 gconf-user;xml:readwrite:$(HOME)/.gconf;50;;GCONF;The normal user configuration source
 gconf-sysadmin-mandatory;include /etc/gconf/2/local-defaults.path;-1;;GCONF;Extra default settings defined by sysadmin
 gconf-defaults;xml:readonly:/etc/gconf/gconf.xml.defaults;-2;;GCONF;Configuration source with the default systemwide settings
diff --git a/desktop-profiles.7 b/desktop-profiles.7
index cfe4aee..8c62fa2 100644
--- a/desktop-profiles.7
+++ b/desktop-profiles.7
@@ -19,7 +19,7 @@ On X startup an Xsession.d script is run that activates all profiles for which t
 .PP
 For KDE, Freedesktop, XFCE (>= 4.2), ROX, and UDE activating profiles is done by setting environment variables: KDEDIRS for KDE, XDG_CONFIG_DIRS and XDG_DATA_DIRS for both Freedesktop and XFCE, CHOICESPATH for ROX, and UDEdir for UDE. Each of these variables, with the exception of UDEdir, takes a a precedence ordered list of root-directories (of activated profiles). UDEdir takes a single root-directory (that of the profile with the highest precedence).
 .PP
-For GConf profiles a user-specific path file is generated containing all the "configuration sources" needed for the to-be-activated profiles. To actually activate the profiles the system-wide path file (/etc/gconf/<gconf-version>/path) needs to be replaced with one including the generated path file (e.g. /usr/share/doc/desktop-profiles/examples/path ; which will give the same behaviour as the default gconf setup using profiles).
+For GConf profiles two user-specific path files are generated. One containing the activated mandatory "configuration sources", one containing the default "configuration sources" that are activated. To actually activate the profiles the system-wide path file (/etc/gconf/<gconf-version>/path) needs to be replaced with one including the generated path file (e.g. /usr/share/doc/desktop-profiles/examples/path ; which will give the same behaviour as the default gconf setup using profiles).
 .PP
 NOTE: Environment variables are only set if they're value is different from the default value, and user-specific path files are only generated if the systemwide gconf path file will include them.
 
@@ -113,6 +113,8 @@ UDE searches for configuration files in the following directories (first find is
 .B GNOME 
 (using GConf 'Configuration Sources'):
 .IP
+Two gconf path files are generated for each user on login: one with all the sources from activated profiles that have a higher precedence then the gconf-user profile (which is in default.listing), and one containing the sources from activated profiles with a lower precedence then the gconf-user profiles. Generated path files are put in /var/cache/desktop-profiles.
+.IP
 Each configuration source is structured like a simple hierarchical file system as follows:
 .IP
 - Directories correspond to applications that use the GConf repository, except for the ' schemas' directory which contains files describing all of the preference keys.
diff --git a/path b/path
index 316d927..416e82d 100644
--- a/path
+++ b/path
@@ -1,14 +1,21 @@
-# System-Wide GConf path-file for use with desktop-profiles package
-#
-# Replacing the standard gconf path file (/etc/gconf/2/path) by this file 
-# generates the same behaviour as freshly-installed gnome. With only the 
-# default profiles in /etc/desktop-profiles/default.listing the generated file
-# will contain the following 4 directives (in the given order):
-#
-#	xml:readonly:/etc/gconf/gconf.xml.mandatory 
-#	include $(HOME)/.gconf.path 
-#	xml:readwrite:$(HOME)/.gconf 
-#	xml:readonly:/etc/gconf/gconf.xml.mandatory 
+# 
+# This path file is meant to be used in conjunction with the desktop-profiles
+# package, default behaviour (withouth additional gconf profiles installed, 
+# is identical to the behaviour using the default gconf path file as deliverd
+# by the gconf2 pacakge
 #
+# See the desktop-profiles (7) man page for more information
 ###############################################################################
-include "/var/cache/desktop-profiles/$(USER)_profiles.path"
+
+# Look for mandatory "configuration sources" from desktop-profiles
+include /var/cache/desktop-profiles/$(USER)_mandatory.path
+
+# Now see where users want us to look - basically the user can stick arbitrary 
+# sources in a ~/.gconf.path file and they're inserted here
+include "$(HOME)/.gconf.path"
+
+# Give users a default storage location, ~/.gconf
+xml:readwrite:$(HOME)/.gconf
+
+# Look for default "configuration sources" from desktop-profiles
+include /var/cache/desktop-profiles/$(USER)_defaults.path

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