[debian-edu-commits] debian-edu/ 19/183: small simplification in 20desktop... (grep can take file argument :)

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 a61b72ac97d2855cd7041b7a081e55ece0e6f92a
Author: Bart Cornelis <cobaco at linux.be>
Date:   Sun Oct 24 19:01:52 2004 +0000

    small simplification in 20desktop... (grep can take file argument :)
    
    add debconf question about wether or not to replace the default system-wide
    path file (default to no)
---
 20desktop-profiles_activateDesktopProfiles |  4 +-
 TODO                                       |  9 +++--
 debian/config                              | 14 +++++++
 debian/control                             | 10 ++---
 debian/po/POTFILES.in                      |  1 +
 debian/po/templates.pot                    | 59 ++++++++++++++++++++++++++++++
 debian/postinst                            | 19 ++++++++++
 debian/rules                               |  1 +
 debian/templates                           | 16 ++++++++
 default.listing                            |  3 +-
 10 files changed, 125 insertions(+), 11 deletions(-)

diff --git a/20desktop-profiles_activateDesktopProfiles b/20desktop-profiles_activateDesktopProfiles
index 27b181a..462b484 100644
--- a/20desktop-profiles_activateDesktopProfiles
+++ b/20desktop-profiles_activateDesktopProfiles
@@ -211,7 +211,7 @@ fi;
 #       contain _only_ that include directive setting everything else up through profiles)
 
 # only generate path files for user if it will be included
-if (cat /etc/gconf/2/path 2>&1 | grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' > /dev/null ) ||
-   (cat /etc/gconf/1/path 2>&1 | grep '/var/cache/desktop-profiles/\$(USER)_profiles.path' > /dev/null ) ; then
+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;
 fi;  
diff --git a/TODO b/TODO
index 15c4668..6d4258a 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,16 @@
 - Finish package:
-  - What to do with systemwide gconf path file?
-    1) Can we legally Replace it ?
+  - pops up debconf question about wether to replace the system wide
+    gconf path file with on version (defaults to no).
+    
+    Can we perhaps leaally replace it?
        -> Policy 7.5 seems to indicate yes _IF_ package Replaces: gconf2
        -> But Policy 10.7.4 seems to indicate I can't I?
-    2) Else pop up debconf question about wether to replace it (default to no)?
   - is rox default right? 
     -> waiting for reaction of rox-maintainer
   - does XFCE support profiles prior to 4.2? 
     -> waiting for reaction of benny (xfce developer)
+  - add kiosktool to Suggests when it becomes available in Debian (can i suggest
+    something not yet in the archive?)
 - Are there any docs on the kiosk system of XFCE 4.2 available anywhere we can
   point to?
 - Add (debconf?) Tools to package to help maintain precedence and requirements
diff --git a/debian/config b/debian/config
new file mode 100755
index 0000000..2f66fe9
--- /dev/null
+++ b/debian/config
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+# 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
+fi;  
diff --git a/debian/control b/debian/control
index 0e00b9a..447102a 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,8 @@ Standards-Version: 3.6.1
 
 Package: desktop-profiles
 Architecture: all
+Build-Depends-Indep: po-debconf
+Depends: ${misc:Depends}
 Suggests: menu-xdg, hicolor-icon-theme, shared-mime-info, gconf-editor
 Enhances: kdebase, gconf, gconf2, rox-filer, libxfce4util-1 (>= 4.2)
 Description: Framework for setting up desktop profiles
@@ -20,8 +22,6 @@ Description: Framework for setting up desktop profiles
  is as simple as dropping a file in /etc/desktop-profiles.
  .
  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)
- KDE, XFCE (>= 4.2), and GNOME profiles all offer the ability to lock things 
- down. 
+ environment completely. Freedesktop profiles allow you to customize XFCE 
+ (>= 4.2) completely, but are still rather limited for cross-desktop 
+ configuration (this should improve in time).
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 0000000..cef83a3
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 0000000..7e46a0a
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,59 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-10-24 20:40+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Replace the default system-wide path file?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The default gconf (i.e. GNOME) setup doesn't facilitate the use of profiles "
+"for certain groups only. The scheme used by this package does. To have gconf "
+"use the scheme of this package the system-wide gconf path file needs to be "
+"replaced by one provided by this package."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"Doin so won't change the default behaviour of gconf but it will allow the "
+"subsequent installation and activation of gconf profiles. Thus it is "
+"recommended that you let me replace the system-wide gconf path file."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"You can always do this later by running dpkg-reconfigure desktop-profiles, "
+"or by manually replacing /etc/gconf/<gconf-version>/path with /usr/share/doc/"
+"desktop-profiles/examples/path."
+msgstr ""
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..0903ac2
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+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 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
+  fi;  
+fi;
diff --git a/debian/rules b/debian/rules
index 8684ea5..60bece6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,6 +35,7 @@ binary-indep: build install
 	dh_installman desktop-profiles.7
 	dh_install 20desktop-profiles_activateDesktopProfiles etc/X11/Xsession.d/
 	dh_install default.listing etc/desktop-profiles/
+	dh_installdebconf
 	dh_compress
 	dh_fixperms
 	dh_installdeb
diff --git a/debian/templates b/debian/templates
new file mode 100644
index 0000000..c795adc
--- /dev/null
+++ b/debian/templates
@@ -0,0 +1,16 @@
+Template: desktop-profiles/replace-gconf-system-wide-path-file
+Type: boolean
+Default: false
+_Description: Replace the default system-wide path file?
+ The default gconf (i.e. GNOME) setup doesn't facilitate the use of
+ profiles for certain groups only. The scheme used by this package does. To
+ have gconf use the scheme of this package the system-wide gconf path file
+ needs to be replaced by one provided by this package.
+ .
+ Doin so won't change the default behaviour of gconf but it will allow the
+ subsequent installation and activation of gconf profiles. Thus it is
+ recommended that you let me replace the system-wide gconf path file.
+ .
+ You can always do this later by running dpkg-reconfigure desktop-profiles,
+ or by manually replacing /etc/gconf/<gconf-version>/path with
+ /usr/share/doc/desktop-profiles/examples/path.
diff --git a/default.listing b/default.listing
index 0692cc7..a9700cf 100644
--- a/default.listing
+++ b/default.listing
@@ -22,7 +22,8 @@ default-rox-system;/usr/local/share/Choices /usr/share/rox/Choices;;;ROX;Default
 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-mandatory;xml:readonly:/etc/gconf/gconf.xml.mandatory;10;;GCONF;Configuration source with the mandatory system-wide settings
+gconf-sysadmin;include /etc/gconf/2/local-mandatory.path;5;;GCONF;Extra mandatory settings defined by sysadmin
 gconf-user-path;include $(HOME)/.gconf.path;2;;GCONF;Extra configuration sources specified by the user
 gconf-user;xml:readwrite:$(HOME)/.gconf;1;;GCONF;The normal user configuration source
 gconf-defaults;xml:readonly:/etc/gconf/gconf.xml.mandatory;;;GCONF;Configuration source with the default systemwide settings

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