[debian-edu-commits] debian-edu/ 16/183: Add support for UDE small simplification in handling of CHOICESPATH

Alexander Alemayhu ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:29 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 fa57c6bf4c1640895598fd2d43f1bcecd735695a
Author: Bart Cornelis <cobaco at linux.be>
Date:   Fri Oct 22 18:50:47 2004 +0000

    Add support for UDE
    small simplification in handling of CHOICESPATH
---
 20desktop-profiles_activateDesktopProfiles | 17 +++++++++++++++--
 debian/control                             | 10 +++++-----
 default.listing                            | 11 +++++++----
 desktop-profiles.7                         | 21 ++++++++++++++++-----
 4 files changed, 43 insertions(+), 16 deletions(-)

diff --git a/20desktop-profiles_activateDesktopProfiles b/20desktop-profiles_activateDesktopProfiles
index fe076e3..27b181a 100644
--- a/20desktop-profiles_activateDesktopProfiles
+++ b/20desktop-profiles_activateDesktopProfiles
@@ -178,14 +178,27 @@ if (test "$XDG_DATA_DIRS"x != x) &&
 fi;
 
 CHOICESPATH=`get_profiles ROX | sed -e "s/^ *//" -e "s/ *$//" -e "s/ /:/g"`
-DEFAULT_CHOICES=`get_profiles_with_fulfilled_requirements $PROFILE_DIR/default.listing | grep '^default-rox-system;' | cut --field 2 --delimiter ";" | sed -e "s/^ *//" -e "s/ *$//" -e "s/ /:/g"`
-DEFAULT_CHOICES="$(get_profiles_with_fulfilled_requirements $PROFILE_DIR/default.listing | grep '^default-rox-user;' | cut --field 2 --delimiter ";" | sed -e "s/^ *//" -e "s/ *$//" -e "s/ /:/g" ):$DEFAULT_CHOICES"
+DEFAULT_CHOICES=$(cat $PROFILE_DIR/default.listing | grep '^default-rox-system;' | cut --field 2 --delimiter ";" | sed -e "s/^ *//" -e "s/ *$//" -e "s/ /:/g")
+DEFAULT_CHOICES="$(cat $PROFILE_DIR/default.listing | grep '^default-rox-user;' | cut --field 2 --delimiter ";" | sed -e "s/^ *//" -e "s/ *$//" -e "s/ /:/g"):$DEFAULT_CHOICES"
 if (test "$CHOICESPATH"x != x) &&
    (test "$CHOICESPATH" != "$DEFAULT_CHOICES"); then
   CHOICESPATH=$(sh -c "echo $CHOICESPATH");# FORCE expansion of variables in CHOICESPATH if any
   export CHOICESPATH;
 fi;
 
+# don't s/ /:g/ in next line, UDE doesn't currently support combining profile dirs
+UDEDIRS=`get_profiles UDE | sed -e "s/^ *//" -e "s/ *$//"`
+if (test "$UDEDIRS"x != x) &&
+   (test "$UDEDIRS" != "`cat $PROFILE_DIR/default.listing | grep "^ude-install-dir" | cut --fields 2 --delimiter ";"`"); then
+  # Take first dir and break, as UDE currently only supports one dir
+  for dir in $UDEDIRS; do 
+    UDEdir=$dir;
+    break;
+  done;  
+  UDEdir=$(sh -c "echo $UDEdir");# FORCE expansion of variables in UDEdir if any
+  export UDEdir;
+fi;
+
 # HACK WARNING:
 #
 # While GCONF allows multiple "configuration sources", there seems to be no clean way to
diff --git a/debian/control b/debian/control
index 7e00a1e..ba9efdf 100644
--- a/debian/control
+++ b/debian/control
@@ -10,17 +10,17 @@ Architecture: all
 Suggests: menu-xdg, hicolor-icon-theme, shared-mime-info, gconf-editor
 Enhances: kdebase, gconf, gconf2, rox-filer 
 Description: Framework for setting up desktop profiles
- KDE, ROX, and freedesktop all natively provide a way to add profiles (by 
- setting certain environment variables), GNOME can be made to support 
- profiles (with a bit of a hack). This package provides a framework for
+ KDE, ROX, freedesktop and UDE all natively provide a way to use profiles (by 
+ setting certain environment variables), while GNOME can be made to support 
+ profiles with a small hack. This package provides a framework for
  using profiles with any and all these environments.
  .
  The framework allows profiles to be activated based on group membership and/or
  the succesfull completion of arbitrary shell-command(s). Adding a new profile
  is as simple as dropping a file in /etc/desktop-profiles.
  .
- Native profiles (KDE, GNOME, ROX) allow you to customize the respective 
+ Native profiles (KDE, GNOME, ROX, UDE) allow you to customize the respective 
  environment completely. Freedesktop profiles are currently rather limited but
  allow to configure things for multiple desktops at once (seems to be KDE, 
  GNOME, ROX, and XFCE to varying degrees for the existing freedesktop standards)
- Both KDE and GNOME profiles offer the ability to lock things down.
+ Both KDE and GNOME profiles offer the ability to lock things down. 
diff --git a/default.listing b/default.listing
index e5aa40d..0692cc7 100644
--- a/default.listing
+++ b/default.listing
@@ -2,8 +2,10 @@
 # profiles in here is to be able to use the default system settings as a 
 # fallback for anything that isn't defined in activated profiles.
 #
-# - CHOICESPATH (the ROX variable) defaults to 
-#   ${HOME}/Choices:/usr/local/share/Choices:/usr/share/Choices
+# - In the Debian packages CHOICESPATH (the ROX variable) defaults to 
+#   $HOME/.rox_choices:/usr/local/share/Choices:/usr/share/rox/Choices 
+#   (upstream uses $HOME/Choices for the user settings, and /usr/share/Choices
+#   for the system settings).
 #   
 #   -> We split this in user settings and system-settings with the user settings
 #      having an very high precedence (1000) so they should normally always be 
@@ -16,8 +18,9 @@
 kde-prefix;/usr;;;KDE;System-wide kde stuff on Debian (stuff in PREFIX)
 default-xdg_config_dirs;/etc/xdg;;;XDG_CONFIG;Default config location defined by XDG Base Directory Specification
 default-xdg_data_dirs;/usr/local/share /usr/share;;;XDG_DATA;Default data locations defined by XDG Base Directory Specification
-default-rox-system;/usr/local/share/Choices /usr/share/Choices;;;ROX;Default locations for non-user settings of ROX programs
-default-rox-user;${HOME}/Choices;1000;;ROX;Default ROX user settings (should normally take precedence over everything else)
+default-rox-system;/usr/local/share/Choices /usr/share/rox/Choices;;;ROX;Default locations for non-user settings of ROX programs on Debian
+default-rox-user;${HOME}/.rox_choices;1000;;ROX;ROX user settings on Debian (should normally take precedence over everything else)
+ude-install-dir;/usr/share/ude;;;UDE;Default location of system-wide UDE stuff
 
 gconf-mandatory;xml:readonly:/etc/gconf/gconf.xml.mandatory;3;;GCONF;Configuration source with the mandatory system-wide settings
 gconf-user-path;include $(HOME)/.gconf.path;2;;GCONF;Extra configuration sources specified by the user
diff --git a/desktop-profiles.7 b/desktop-profiles.7
index adaf23d..a1665a9 100644
--- a/desktop-profiles.7
+++ b/desktop-profiles.7
@@ -6,7 +6,7 @@ desktop-profiles \- introduction and overview
 .SH DESCRIPTION
 Desktop-profiles is a framework for activating and deactivating profiles (conditional setups) for the various desktop environments in Debian. 
 .PP
-It currently supports KDE, Freedesktop, and ROX out of the box. Support for Gconf (i.e. Gnome) profiles  is present but needs a change to the default gconf configuration to be activated (see 
+It currently supports KDE, Freedesktop, ROX, and UDE out of the box. Support for Gconf (i.e. Gnome) profiles  is present but needs a change to the default gconf configuration to be activated (see 
 .B "HOW IT WORKS"
 below).
 
@@ -17,7 +17,7 @@ below).
 .PP
 On X startup an Xsession.d script is run that activates all profiles for which the criteria are met in order of precedence.
 .PP
-For KDE, Freedesktop, and ROX profiles activating profiles is done by setting, respectively, the KDEDIRS, XDG_CONFIG_DIRS & XDG_DATA_DIRS, and CHOISEPATH environment variables to the correct values 
+For KDE, Freedesktop, ROX, and UDE activating profiles is done by setting, respectively, the KDEDIRS, XDG_CONFIG_DIRS & XDG_DATA_DIRS, CHOISEPATH, and UDEdir environment variables. All those variables, with the exception of UDEdir, take a precedence ordered list of the root directories of activated profiles. UDEdir contain a single directory, namely the root directory of the highest ranked activate profile.
 .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).
 .PP
@@ -31,14 +31,14 @@ Empty lines and lines starting with \'#\' (i.e. comment lines) are ignored. All
 .IP \(bu 4
 .B 2nd field: 
 .IP 
-Location of the root of the profile directory tree, may contain more then 2 directory (in which case directies should be separated with spaces). Variables may be used in the directory root instances (e.g. $HOME/.extra_config could be a profile root directory). 
+Location of the root of the profile directory tree, may contain more then 2 directory (in which case directies should be separated with spaces). Environment variables may be used when specifying root directories (e.g. $HOME/.extra_config).
 .IP
 Except for Gconf profiles, which use the this field to contain exactly one directive to be included in the generated path file (directives are either \'xml:(readonly|readwrite):<profile-root>\', or \'include <some-path-file>' ).
 .IP \(bu 4
 .B 3th field
 : A Numeric precedence value for the profile, may be empty (which is treated as lowest possible precedence).
 .IP
-When 2 (or more) active profiles define a setup for the same thing, the value specified by the profile with the highest precedence value is used.
+When 2 (or more) active profiles define a setup for the same thing, the value specified by the profile with the highest precedence value is used (UDE will onlyuse values from the highest ranked profile).
 .IP \(bu 4
 .B 4th field
 : Space separated list of conditions that need to be met to activate the profiles (if more then 1 condition is specified all conditions need to be met to activate the profile).
@@ -56,7 +56,7 @@ There are 3 different kinds of requirements:
    (Where <command> is an arbitrary shell command)
 .IP \(bu 4
 .B 5th field
-: The kind of profile, must be set and one of: KDE, ROX, XDG_CONFIG, XDG_DATA, or GCONF.
+: The kind of profile, must be set and one of: KDE, XDG_CONFIG, XDG_DATA, ROX, UDE or GCONF.
 .IP \(bu 4
 .B 6th field
 : A description of what the profile is/does, may be empty.
@@ -88,6 +88,17 @@ NOTE: Programs _may_ merge the files the different profiles. If the merging enco
 .IP   
 See http://rox.sourceforge.net/choices.html for a more detailed description.
 .IP \(bu 4
+.B UDE
+(through UDEdir):
+.IP
+UDE searches for configuration files in the following directories (first find is used): 
+.IP
+1. $HOME/.ude/config
+.IP
+2. $UDEdir/config  (or in absence of $UDEdir in the install dir which is /usr/share/ude on debian)
+.IP
+3. If the configuration file is still not found, UWM takes the filename as it is (usually dereferencing any environment variables first)
+.IP \(bu 4
 .B GNOME 
 (using GConf 'Configuration Sources'):
 .IP

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