Bug#358364: postrm not idempotent
found 358364 0.10 thanks It seems this is back: excelsior:~# ls -l /var/lib/xml-core/ total 8 -rw-r--r-- 1 root root 262 Apr 16 16:22 catalog -rw-r--r-- 1 root root 304 Apr 16 16:22 xml-core excelsior:~# apt-get remove xml-core Reading package lists... Done Building dependency tree... Done The following packages will be REMOVED: xml-core 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. Need to get 0B of archives. After unpacking 254kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 10006 files and directories currently installed.) Removing xml-core ... excelsior:~# ls -l /var/lib/xml-core/ ls: /var/lib/xml-core/: No such file or directory excelsior:~# dpkg --purge xml-core (Reading database ... 9971 files and directories currently installed.) Removing xml-core ... Purging configuration files for xml-core ... rmdir: /var/lib/xml-core: No such file or directory dpkg: error processing xml-core (--purge): subprocess post-removal script returned error exit status 1 Errors were encountered while processing: xml-core excelsior:~# Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#358364: postrm not idempotent
tags 358364 patch stop -- one bug less to finish the NM proces -- CPD - Universidad Pontificia de Salamanca Tlf. 923 277 136 - Ext. 7263 .''`. Pienso, Luego Incordio : :' : `. `' Proudly running Debian GNU/Linux (Sid 2.6.14) `-www.debian.orgwww.upsa.es GPG Key: 26F020F7 GPG fingerprint: 4986 39DA D152 050B 4699 9A71 66DB 5A36 26F0 20F7diff -uNr xml-core-0.09.orig/debian/xml-core.postrm xml-core-0.09/debian/xml-core.postrm --- xml-core-0.09.orig/debian/xml-core.postrm 2006-04-01 10:48:43.0 +0200 +++ xml-core-0.09/debian/xml-core.postrm 2006-04-01 10:47:56.0 +0200 @@ -17,8 +17,7 @@ ## -- ## remove /var/lib/xml-core cd /var/lib -rmdir --ignore-fail-on-non-empty xml-core -cd - >/dev/null +test -d /var/lib/xml-core && rmdir --ignore-fail-on-non-empty xml-core ## -- ## remove root XML catalog @@ -28,8 +27,7 @@ ## -- ## remove /etc/xml cd /etc -rmdir --ignore-fail-on-non-empty xml -cd - >/dev/null +test -d /etc/xml && rmdir --ignore-fail-on-non-empty xml ## -- ## restore legacy /etc/xml/catalog @@ -37,7 +35,6 @@ then cd /etc/xml mv catalog.legacy catalog -cd - >/dev/null fi fi
Bug#358364: postrm not idempotent
Package: xml-core Version: 0.09 Severity: serious If your try to run the postrm twice (which it is required to handle correctly by policy 6.2) you get the following error: Removing xml-core ... Purging configuration files for xml-core ... rmdir: xml-core: No such file or directory dpkg: error processing xml-core (--purge): subprocess post-removal script returned error exit status 1 Also the "cd -" afterwards is very fragile since you can't really depend on this directory to exist. The postrm should probably not fail if it doesn't. Gruesse, Frank Lichtenheld -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-1-k7 Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages xml-core depends on: ii perl 5.8.8-2Larry Wall's Practical Extraction ii sgml-base 1.26 SGML infrastructure and SGML catal xml-core recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]