Hi,
Jan Christoph Nordholz wrote:
Hi,
dpkg: error processing mt-st (--purge):
subprocess post-removal script returned error exit status 1
Consecutive calls to 'dpkg --purge' gets the same error and no more
information.
Looking at /var/lib/dpkg/info/mt-st.postrm, I think it's due to:
if [ "$1" = purge ]; then
[ -L /etc/udev/rules.d/z60_mt-st.rules ] && \
rm /etc/udev/rules.d/z60_mt-st.rules
fi
if the file isn't a link or doesn't exist, the script returns with an
error code. With a proper 'if' statement, the problem should occur.
No - commands that are part of an && or || chain are excepted from
terminating 'set -e'-shell scripts even if they exit with nonzero status
(otherwise, there'd be little point in using these constructs - and the
I didn't know this, good to know, but it's not the point because the
above command is the last one in the script, which exits with the return
code of the command, i.e. 1 if the link doesn't exist.
paragraph in question is automatically generated by debhelper). ;-)
If you're sure of this, then debhelper is wrong and you should forward
the bug to the package.
I have successfully patched the post-rm script by replacing the "&&"
construct through an "if" one, and the package purged flawlessly.
But it's easy to test: install mt-st, remove the above link and try to
--purge the package. I can reproduce it, see the end of the mail.
Cheers, Eric
zorglub:~# apt-get install mt-st
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed
mt-st
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.7kB of archives.
After unpacking 184kB of additional disk space will be used.
Get: 1 ftp://ftp.de.debian.org testing/main mt-st 0.9b-2 [29.7kB]
Fetched 29.7kB in 2s (12.3kB/s)
Selecting previously deselected package mt-st.
(Reading database ... 161162 files and directories currently installed.)
Unpacking mt-st (from .../archives/mt-st_0.9b-2_i386.deb) ...
Setting up mt-st (0.9b-2) ...
zorglub:~# ll /etc/udev/rules.d/z60_mt-st.rules
lrwxrwxrwx 1 root root 14 2006-08-07 23:13
/etc/udev/rules.d/z60_mt-st.rules -> ../mt-st.rules
zorglub:~# dpkg --purge mt-st
(Reading database ... 161178 files and directories currently installed.)
Removing mt-st ...
Purging configuration files for mt-st ...
zorglub:~# apt-get install mt-st
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed
mt-st
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/29.7kB of archives.
After unpacking 184kB of additional disk space will be used.
Selecting previously deselected package mt-st.
(Reading database ... 161162 files and directories currently installed.)
Unpacking mt-st (from .../archives/mt-st_0.9b-2_i386.deb) ...
Setting up mt-st (0.9b-2) ...
zorglub:~# rm /etc/udev/rules.d/z60_mt-st.rules
zorglub:~# dpkg --purge mt-st
(Reading database ... 161178 files and directories currently installed.)
Removing mt-st ...
Purging configuration files for mt-st ...
dpkg: error processing mt-st (--purge):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
mt-st
zorglub:~# ln -s ../mt-st.rules /etc/udev/rules.d/z60_mt-st.rules
zorglub:~# dpkg --purge mt-st
(Reading database ... 161167 files and directories currently installed.)
Removing mt-st ...
Purging configuration files for mt-st ...
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]