[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: rev 963 - branches/4.3.0/sid/debian



Author: branden
Date: 2004-01-22 13:47:33 -0500 (Thu, 22 Jan 2004)
New Revision: 963

Modified:
   branches/4.3.0/sid/debian/changelog
   branches/4.3.0/sid/debian/xserver-common.config.in
   branches/4.3.0/sid/debian/xserver-common.postinst.in
   branches/4.3.0/sid/debian/xserver-common.postrm.in
   branches/4.3.0/sid/debian/xserver-common.preinst.in
   branches/4.3.0/sid/debian/xserver-xfree86.config.in
   branches/4.3.0/sid/debian/xserver-xfree86.postinst.in
   branches/4.3.0/sid/debian/xserver-xfree86.postrm.in
   branches/4.3.0/sid/debian/xserver-xfree86.preinst.in
   branches/4.3.0/sid/debian/xserver-xfree86.prerm.in
Log:
Create the /etc/X11 directory in the xserver-common and xserver-xfree86
package preinst scripts if the directory does not already exist.  These
scripts may need to create files (or symlinks) in these directories,
xfree86-common may not have been unpacked yet, and Pre-Depending on it is
too heavyweight a solution.  Thanks to Joey Hess for finding this problem.
(Closes: #228810)

Reduce the amount of hard-coding of the /etc/X11 directory, moving it into
a shell variable instead.

Remove the /etc/X11 directory on package purge if it is empty (it is
not in dpkg's file list, as these packages do not ship it).


Modified: branches/4.3.0/sid/debian/changelog
===================================================================
--- branches/4.3.0/sid/debian/changelog	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/changelog	2004-01-22 18:47:33 UTC (rev 963)
@@ -144,8 +144,20 @@
     Thanks to Colin Watson for bringing this issue up on debian-policy.
     - debian/control
 
- -- Branden Robinson <branden@debian.org>  Wed, 21 Jan 2004 20:12:44 -0500
+  * Create the /etc/X11 directory in the xserver-common and xserver-xfree86
+    package preinst scripts if the directory does not already exist.  These
+    scripts may need to create files (or symlinks) in these directories,
+    xfree86-common may not have been unpacked yet, and Pre-Depending on it is
+    too heavyweight a solution.  Also, reduce the amount of hard-coding of the
+    /etc/X11 directory, moving it into a shell variable instead.  Finally,
+    remove the /etc/X11 directory on package purge if it is empty (it is
+    not in dpkg's file list, as these packages do not ship it).  Thanks to
+    Joey Hess for finding this problem.  (Closes: #228810)
+    - debian/xserver-common.{config,preinst,postinst,postrm}.in
+    - debian/xserver-xfree86.{config,preinst,postinst,prerm,postrm}.in
 
+ -- Branden Robinson <branden@debian.org>  Thu, 22 Jan 2004 13:22:06 -0500
+
 xfree86 (4.3.0-0pre1v5) experimental; urgency=low
 
   * Grab fixes to upstream CVS xf-4_3-branch since last pull.

Modified: branches/4.3.0/sid/debian/xserver-common.config.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-common.config.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-common.config.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -16,8 +16,9 @@
 
 #INCLUDE_SHELL_LIB#
 
-XWRAPPER_CONFIG=/etc/X11/Xwrapper.config
-OLD_CONFIG_FILE=/etc/X11/Xserver
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
+OLD_CONFIG_FILE="$CONFIG_DIR/Xserver"
 
 allowed_users_english_to_actual () {
   case "$1" in

Modified: branches/4.3.0/sid/debian/xserver-common.postinst.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-common.postinst.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-common.postinst.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -17,7 +17,8 @@
 
 #INCLUDE_SHELL_LIB#
 
-XWRAPPER_CONFIG=/etc/X11/Xwrapper.config
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
 CONFIG_AUX_DIR=/var/lib/xfree86
 XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum"
 XWRAPPER_CONFIG_ROSTER="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.roster"
@@ -76,8 +77,8 @@
 # If you have edited this file but would like it to be automatically updated
 # again, run the following commands as root:
 #
-#   cp /etc/X11/Xwrapper.config /etc/X11/Xwrapper.config.custom
-#   md5sum /etc/X11/Xwrapper.config > /var/lib/xfree86/Xwrapper.config.md5sum
+#   cp $XWRAPPER_CONFIG $XWRAPPER_CONFIG.custom
+#   md5sum $XWRAPPER_CONFIG > $XWRAPPER_CONFIG_CHECKSUM
 #   dpkg-reconfigure xserver-common
 allowed_users=$ALLOWED_USERS
 nice_value=$NICE_VALUE

Modified: branches/4.3.0/sid/debian/xserver-common.postrm.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-common.postrm.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-common.postrm.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -14,7 +14,8 @@
 
 #INCLUDE_SHELL_LIB#
 
-XWRAPPER_CONFIG=/etc/X11/Xwrapper.config
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
 CONFIG_AUX_DIR=/var/lib/xfree86
 XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum"
 XWRAPPER_CONFIG_ROSTER="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.roster"
@@ -66,7 +67,7 @@
 
   # we can take /etc/X11/xserver out of this list one day when dpkg fixes
   # #112386
-  for DIR in /etc/X11/xserver /etc/X11 "$CONFIG_AUX_DIR"; do
+  for DIR in /etc/X11/xserver "$CONFIG_DIR" "$CONFIG_AUX_DIR"; do
       rmdir "$DIR" 2> /dev/null || true
   done
 fi

Modified: branches/4.3.0/sid/debian/xserver-common.preinst.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-common.preinst.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-common.preinst.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -17,7 +17,8 @@
 
 #INCLUDE_SHELL_LIB#
 
-XWRAPPER_CONFIG=/etc/X11/Xwrapper.config
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
 CONFIG_AUX_DIR=/var/lib/xfree86
 XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum"
 
@@ -29,11 +30,14 @@
   fi
   check_symlinks_and_warn /usr/X11R6/lib/X11/xserver
 
-  # create the configuration files' auxiliary directory if it doesn't exist
-  if [ ! -e "$CONFIG_AUX_DIR" ]; then
-    observe "creating $CONFIG_AUX_DIR"
-    mkdir --mode=755 --parents "$CONFIG_AUX_DIR"
-  fi
+  # create the configuration files' main and auxiliary directories if they
+  # don't exist
+  for DIR in "$CONFIG_DIR" "$CONFIG_AUX_DIR"; do
+    if [ ! -e "$DIR" ]; then
+      observe "creating $DIR"
+      mkdir --mode=755 --parents "$DIR"
+    fi
+  done
 
   # implement (simplified) ucf-style configration file handling
 

Modified: branches/4.3.0/sid/debian/xserver-xfree86.config.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-xfree86.config.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-xfree86.config.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -16,8 +16,9 @@
 
 #INCLUDE_SHELL_LIB#
 
-SERVER_SYMLINK=/etc/X11/X
-XF86CONFIG=/etc/X11/XF86Config-4
+CONFIG_DIR=/etc/X11
+SERVER_SYMLINK="$CONFIG_DIR/X"
+XF86CONFIG="$CONFIG_DIR/XF86Config-4"
 THIS_SERVER=/usr/bin/X11/XFree86
 
 NCARDS=0

Modified: branches/4.3.0/sid/debian/xserver-xfree86.postinst.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-xfree86.postinst.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-xfree86.postinst.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -17,8 +17,9 @@
 
 #INCLUDE_SHELL_LIB#
 
-SERVER_SYMLINK=/etc/X11/X
-XF86CONFIG=/etc/X11/XF86Config-4
+CONFIG_DIR=/etc/X11
+SERVER_SYMLINK="$CONFIG_DIR/X"
+XF86CONFIG="$CONFIG_DIR/XF86Config-4"
 CONFIG_AUX_DIR=/var/lib/xfree86
 SERVER_SYMLINK_CHECKSUM="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.md5sum"
 SERVER_SYMLINK_ROSTER="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.roster"

Modified: branches/4.3.0/sid/debian/xserver-xfree86.postrm.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-xfree86.postrm.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-xfree86.postrm.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -14,8 +14,9 @@
 
 #INCLUDE_SHELL_LIB#
 
-SERVER_SYMLINK=/etc/X11/X
-XF86CONFIG=/etc/X11/XF86Config-4
+CONFIG_DIR=/etc/X11
+SERVER_SYMLINK="$CONFIG_DIR/X"
+XF86CONFIG="$CONFIG_DIR/XF86Config-4"
 CONFIG_AUX_DIR=/var/lib/xfree86
 SERVER_SYMLINK_CHECKSUM="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.md5sum"
 SERVER_SYMLINK_ROSTER="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.roster"
@@ -97,7 +98,7 @@
     fi
   fi
 
-  for DIR in /etc/X11 "$CONFIG_AUX_DIR"; do
+  for DIR in "$CONFIG_DIR" "$CONFIG_AUX_DIR"; do
       rmdir "$DIR" 2> /dev/null || true
   done
 fi

Modified: branches/4.3.0/sid/debian/xserver-xfree86.preinst.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-xfree86.preinst.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-xfree86.preinst.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -16,8 +16,9 @@
 
 #INCLUDE_SHELL_LIB#
 
-SERVER_SYMLINK=/etc/X11/X
-XF86CONFIG=/etc/X11/XF86Config-4
+CONFIG_DIR=/etc/X11
+SERVER_SYMLINK="$CONFIG_DIR/X"
+XF86CONFIG="$CONFIG_DIR/XF86Config-4"
 CONFIG_AUX_DIR=/var/lib/xfree86
 SERVER_SYMLINK_CHECKSUM="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.md5sum"
 XF86CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XF86CONFIG##*/}.md5sum"
@@ -25,10 +26,14 @@
 UNCONFIGURED_LINK_TARGET=$(which true)
 
 if [ "$1" = "install" -o "$1" = "upgrade" ]; then
-  # create the configuration files' auxiliary directory if it doesn't exist
-  if [ ! -e "$CONFIG_AUX_DIR" ]; then
-    mkdir --mode=755 --parents "$CONFIG_AUX_DIR"
-  fi
+  # create the configuration files' main and auxiliary directories if they
+  # don't exist
+  for DIR in "$CONFIG_DIR" "$CONFIG_AUX_DIR"; do
+    if [ ! -e "$DIR" ]; then
+      observe "creating $DIR"
+      mkdir --mode=755 --parents "$DIR"
+    fi
+  done
 
   # implement (simplified) ucf-style configration file handling
 

Modified: branches/4.3.0/sid/debian/xserver-xfree86.prerm.in
===================================================================
--- branches/4.3.0/sid/debian/xserver-xfree86.prerm.in	2004-01-22 18:05:32 UTC (rev 962)
+++ branches/4.3.0/sid/debian/xserver-xfree86.prerm.in	2004-01-22 18:47:33 UTC (rev 963)
@@ -21,7 +21,8 @@
 
 #INCLUDE_SHELL_LIB#
 
-SERVER_SYMLINK=/etc/X11/X
+CONFIG_DIR=/etc/X11
+SERVER_SYMLINK="$CONFIG_DIR/X"
 CONFIG_AUX_DIR=/var/lib/xfree86
 SERVER_SYMLINK_CHECKSUM="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.md5sum"
 UNCONFIGURED_LINK_TARGET=$(which true)



Reply to: