[xml/sgml-pkgs] Bug#576445: [patch]: sgml-base: Fails to purge

Michael Banck mbanck at debian.org
Sat Jul 17 14:27:52 UTC 2010


Hi,

On Mon, Apr 12, 2010 at 05:39:07PM +0900, Hideki Yamane wrote:
> +    ## remove /etc/sgml and /var/lib/sgml-base
> +    for dir in /etc/sgml /var/lib/sgml-base
> +    if [ -d $dir ]; then
> +       rmdir --ignore-fail-on-non-empty $dir
> +    fi

This is not correct shell-code, you're missing the do ... done
statements.  I will upload the attached NMU from the current BSP by the
end of the weekend if no maintainer upload happens.


Michael
-------------- next part --------------
diff -Nru sgml-base-1.26/debian/changelog sgml-base-1.26+nmu1/debian/changelog
--- sgml-base-1.26/debian/changelog	2004-08-14 17:04:15.000000000 +0200
+++ sgml-base-1.26+nmu1/debian/changelog	2010-07-17 16:27:17.000000000 +0200
@@ -1,3 +1,12 @@
+sgml-base (1.26+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Applied patch from Hideki Yamane adding a check whether directories exist
+    before removing them on purge 
+    (closes: Bug#576445)
+
+ -- Michael Banck <mbanck at debian.org>  Sat, 17 Jul 2010 16:27:02 +0200
+
 sgml-base (1.26) unstable; urgency=low
 
   * Removed creation of the transitional catalog in a installation
diff -Nru sgml-base-1.26/debian/sgml-base.postrm sgml-base-1.26+nmu1/debian/sgml-base.postrm
--- sgml-base-1.26/debian/sgml-base.postrm	2004-08-14 17:04:15.000000000 +0200
+++ sgml-base-1.26+nmu1/debian/sgml-base.postrm	2010-07-17 16:15:59.000000000 +0200
@@ -15,16 +15,12 @@
     rm -f /etc/sgml/catalog /etc/sgml/catalog.old
 
     ## ------------------------------------------------------------------
-    ## remove /etc/sgml
-    cd /etc
-    rmdir --ignore-fail-on-non-empty sgml
-    cd - >/dev/null
-
-    ## ------------------------------------------------------------------
-    ## remove /var/lib/sgml-base
-    cd /var/lib
-    rmdir --ignore-fail-on-non-empty sgml-base
-    cd - >/dev/null
+    ## remove /etc/sgml and /var/lib/sgml-base
+    for dir in /etc/sgml /var/lib/sgml-base; do
+      if [ -d $dir ]; then
+         rmdir --ignore-fail-on-non-empty $dir
+      fi
+    done
 
 fi
 


More information about the debian-xml-sgml-pkgs mailing list