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

X Strike Force X.Org X11 SVN commit: r2161 - trunk/debian/xorg/debian



Author: dnusinow
Date: 2006-05-16 23:00:28 -0400 (Tue, 16 May 2006)
New Revision: 2161

Modified:
   trunk/debian/xorg/debian/changelog
   trunk/debian/xorg/debian/x11-common.links
   trunk/debian/xorg/debian/x11-common.postinst.in
   trunk/debian/xorg/debian/x11-common.preinst.in
   trunk/debian/xorg/debian/x11-common.templates
Log:
* Make several improvements to the code that makes /usr/X11R6/bin a symlink
  + Move the logic to perform the switch to the x11-common preinst
  + If the rmdir command fails, use debconf to inform the user
  + Use debhelper's normal methods to create the symlink, so that the
    packaging infrastructure is aware of it
  Thanks to Eduard Bloch, Steve Langasek, Daniel Stone, and Vincent Lefevre
  for helping hammer this out. (closes: #362885, #363699)

Modified: trunk/debian/xorg/debian/changelog
===================================================================
--- trunk/debian/xorg/debian/changelog	2006-05-17 02:36:29 UTC (rev 2160)
+++ trunk/debian/xorg/debian/changelog	2006-05-17 03:00:28 UTC (rev 2161)
@@ -22,8 +22,15 @@
   * Recover old changelog entries from the 6.8 and 6.9 era and put in to
     changelog.Debian.old. Install this file in the x11-common package. Thanks
     Kevin B. McCarty. (closes: #364087)
+  * Make several improvements to the code that makes /usr/X11R6/bin a symlink
+    + Move the logic to perform the switch to the x11-common preinst
+    + If the rmdir command fails, use debconf to inform the user
+    + Use debhelper's normal methods to create the symlink, so that the
+      packaging infrastructure is aware of it
+    Thanks to Eduard Bloch, Steve Langasek, Daniel Stone, and Vincent Lefevre
+    for helping hammer this out. (closes: #362885, #363699)
 
- -- David Nusinow <dnusinow@debian.org>  Tue, 16 May 2006 22:34:32 -0400
+ -- David Nusinow <dnusinow@debian.org>  Tue, 16 May 2006 22:59:24 -0400
 
 xorg (1:7.0.18) unstable; urgency=low
 

Modified: trunk/debian/xorg/debian/x11-common.links
===================================================================
--- trunk/debian/xorg/debian/x11-common.links	2006-05-17 02:36:29 UTC (rev 2160)
+++ trunk/debian/xorg/debian/x11-common.links	2006-05-17 03:00:28 UTC (rev 2161)
@@ -1,3 +1,4 @@
 usr/bin usr/bin/X11
 usr/X11R6/lib/X11/fonts usr/lib/X11/fonts
 etc/X11/rgb.txt usr/share/X11/rgb.txt
+usr/bin usr/X11R6/bin

Modified: trunk/debian/xorg/debian/x11-common.postinst.in
===================================================================
--- trunk/debian/xorg/debian/x11-common.postinst.in	2006-05-17 02:36:29 UTC (rev 2160)
+++ trunk/debian/xorg/debian/x11-common.postinst.in	2006-05-17 03:00:28 UTC (rev 2161)
@@ -50,12 +50,6 @@
   fi
 fi
 
-if [ -d "/usr/X11R6/bin" ] && [ ! -L /usr/X11R6/bin ]; then
-  rmdir "/usr/X11R6/bin" || die "Could not remove /usr/X11R6/bin. Is not yet empty. Please remove any items still in the directory. You can move them back after the install has completed successfully."
-fi
-if ! [ -e "/usr/X11R6/bin" ]; then
-  ln -s /usr/bin /usr/X11R6/bin || die "Could not link /usr/bin to /usr/X11R6/bin"
-fi
 
 # only mess with config file it exists; otherwise, assume that's the way the
 # user wants it, but only if upgrading

Modified: trunk/debian/xorg/debian/x11-common.preinst.in
===================================================================
--- trunk/debian/xorg/debian/x11-common.preinst.in	2006-05-17 02:36:29 UTC (rev 2160)
+++ trunk/debian/xorg/debian/x11-common.preinst.in	2006-05-17 03:00:28 UTC (rev 2161)
@@ -44,6 +44,17 @@
     rm /usr/X11R6/lib/X11/fonts
   fi
 
+  # We need to remove /usr/X11R6/bin so we can replace it with a symlink
+  if [ -d "/usr/X11R6/bin" ] && [ ! -L /usr/X11R6/bin ]; then
+    rmdir "/usr/X11R6/bin" 
+    if [ "$?" ne 0 ]; then
+      run db_fset x11-common/x11r6_bin_not_empty seen false
+      run db_input critical x11-common/x11r6_bin_not_empty
+      run db_go
+      exit 1
+    fi
+  fi
+
   # migration hilarity
   if [ -n "$FIRSTINST" ]; then
     for i in allowed_users actual_allowed_users nice_value; do

Modified: trunk/debian/xorg/debian/x11-common.templates
===================================================================
--- trunk/debian/xorg/debian/x11-common.templates	2006-05-17 02:36:29 UTC (rev 2160)
+++ trunk/debian/xorg/debian/x11-common.templates	2006-05-17 03:00:28 UTC (rev 2161)
@@ -44,3 +44,17 @@
  package is installed after upgrade. If it is not installed and you require
  it, it is recommended that you install the xorg package to make sure you
  have a fully functional X setup.
+
+Template: x11-common/x11r6_bin_not_empty
+Type: note
+_Description: Can Not Remove /usr/X11R6/bin Directory
+ This upgrade requires that the /usr/X11R6/bin directory be removed and
+ replaced with a symlink. An attempt was made to do so, but it failed, most
+ likely because the directory is not yet empty. You must move the files
+ that are currently in the directory out of the way so that the
+ installation can complete. If you like, you may move them back after the
+ symlink is in place.
+
+ This package installation will now fail and exit so that you can do this.
+ Please re-run your upgrade procedure after you have cleaned out the
+ directory.



Reply to: