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

X Strike Force SVN commit: rev 451 - trunk/debian



Author: branden
Date: 2003-08-27 22:19:37 -0500 (Wed, 27 Aug 2003)
New Revision: 451

Modified:
   trunk/debian/changelog
   trunk/debian/xserver-common.postrm.in
   trunk/debian/xserver-xfree86.postrm.in
Log:
debian/xserver-{common,xfree86}.postrm.in: further robustify purge procedure;
  don't fail when there are no lines left in the roster file except the name of
  the package we're purging, and do not let cat spew noise to stderr if the
  temporary roster file does not get created


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2003-08-28 02:31:07 UTC (rev 450)
+++ trunk/debian/changelog	2003-08-28 03:19:37 UTC (rev 451)
@@ -51,11 +51,15 @@
     - debian/local/xvfb-run: implement
     - debian/local/xvfb-run.1: document
 
-  * debian/xserver-{common,xfree86}.postrm.in: fix horrendous paper-bag bug
-    (failure to give fgrep a file to operate on, causing it to wait forever on
-    standart input) that prevented xserver-common and xserver-xfree86 from
-    being able to purge under some circumstances (thanks, Ingo Saitz)
-    (Closes: #207305)
+  * debian/xserver-{common,xfree86}.postrm.in:
+    - fix horrendous paper-bag bug (failure to give fgrep a file to operate
+      on, causing it to wait forever on standart input) that prevented
+      xserver-common and xserver-xfree86 from being able to purge under some
+      circumstances (thanks, Ingo Saitz) (Closes: #207305)
+    - further robustify purge procedure; don't fail when there are no lines
+      left in the roster file except the name of the package we're purging,
+      and do not let cat spew noise to stderr if the temporary roster file
+      does not get created
 
   * debian/po/fr.po: updated French translations (thanks, Christian Perrier)
     (Closes: #207239)
@@ -70,7 +74,7 @@
     architectures that don't build the XFree86 X server, like s390; fixes
     FTBFS on s390)
 
- -- Branden Robinson <branden@debian.org>  Wed, 27 Aug 2003 13:06:44 -0500
+ -- Branden Robinson <branden@debian.org>  Wed, 27 Aug 2003 22:16:59 -0500
 
 xfree86 (4.2.1-10) unstable; urgency=medium
 

Modified: trunk/debian/xserver-common.postrm.in
===================================================================
--- trunk/debian/xserver-common.postrm.in	2003-08-28 02:31:07 UTC (rev 450)
+++ trunk/debian/xserver-common.postrm.in	2003-08-28 03:19:37 UTC (rev 451)
@@ -32,11 +32,12 @@
   if [ -e "$XWRAPPER_CONFIG_ROSTER" ]; then
     # check existing roster file for our package name
     if fgrep -qx "$THIS_PACKAGE" "$XWRAPPER_CONFIG_ROSTER"; then
-      # construct temporary roster file with our package name removed
+      # construct temporary roster file with our package name removed, ignoring
+      # failure
       fgrep -vx "$THIS_PACKAGE" "$XWRAPPER_CONFIG_ROSTER" > \
-        "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp"
+        "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" || true
       # is there anything left?
-      if [ -n "$(cat "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp")" ]; then
+      if [ -n "$(cat "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then
         # yes, replace the roster file
         mv "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" "$XWRAPPER_CONFIG_ROSTER"
       else

Modified: trunk/debian/xserver-xfree86.postrm.in
===================================================================
--- trunk/debian/xserver-xfree86.postrm.in	2003-08-28 02:31:07 UTC (rev 450)
+++ trunk/debian/xserver-xfree86.postrm.in	2003-08-28 03:19:37 UTC (rev 451)
@@ -29,11 +29,12 @@
   if [ -e "$SERVER_SYMLINK_ROSTER" ]; then
     # check existing roster file for our package name
     if fgrep -qx "$THIS_PACKAGE" "$SERVER_SYMLINK_ROSTER"; then
-      # construct temporary roster file with our package name removed
+      # construct temporary roster file with our package name removed, ignoring
+      # failure
       fgrep -vx "$THIS_PACKAGE" "$SERVER_SYMLINK_ROSTER" > \
-        "$SERVER_SYMLINK_ROSTER.dpkg-tmp"
+        "$SERVER_SYMLINK_ROSTER.dpkg-tmp" || true
       # is there anything left?
-      if [ -n "$(cat "$SERVER_SYMLINK_ROSTER.dpkg-tmp")" ]; then
+      if [ -n "$(cat "$SERVER_SYMLINK_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then
         # yes, replace the roster file
         mv "$SERVER_SYMLINK_ROSTER.dpkg-tmp" "$SERVER_SYMLINK_ROSTER"
       else
@@ -64,11 +65,12 @@
   if [ -e "$XF86CONFIG_ROSTER" ]; then
     # check existing roster file for our package name
     if fgrep -qx "$THIS_PACKAGE" "$XF86CONFIG_ROSTER"; then
-      # construct temporary roster file with our package name removed
+      # construct temporary roster file with our package name removed, ignoring
+      # failure
       fgrep -vx "$THIS_PACKAGE" "$XF86CONFIG_ROSTER" > \
-        "$XF86CONFIG_ROSTER.dpkg-tmp"
+        "$XF86CONFIG_ROSTER.dpkg-tmp" || true
       # is there anything left?
-      if [ -n "$(cat "$XF86CONFIG_ROSTER.dpkg-tmp")" ]; then
+      if [ -n "$(cat "$XF86CONFIG_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then
         # yes, replace the roster file
         mv "$XF86CONFIG_ROSTER.dpkg-tmp" "$XF86CONFIG_ROSTER"
       else



Reply to: