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

Bug#261137: could not be removed when postinst didn't run



On 23.07.04 Rene Engelhard (rene@debian.org) wrote:

Hi,

> Removing tetex-extra ...
> /var/lib/dpkg/info/tetex-extra.postrm: line 26: cd:
> /var/lib/texmf/web2c: No such file or directory
> dpkg: error processing tetex-extra (--remove):
>  subprocess post-removal script returned error exit status 127
>  Errors were encountered while processing:
>   tetex-extra
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> tetex-extra was installed in an sbuild run for installing the
> requirements for a build and was unpacked but not configured by apt
> yet.
> 
root@drachi:~# dpkg -l tetex-base
Desired=Unknown/Install/Remove/Purge/Hold
|Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  tetex-base     2.0.2-9        Basic library files of teTeX
root@drachi:~# dpkg -S /var/lib/texmf/web2c
tetex-base, tetex-bin: /var/lib/texmf/web2c

postrm of tetex-bin contains a

rm -rf /var/lib/texmf/web2c

I don't know exactly what happened here. I try to guess:
You unpacked tetex-extra, but did not configure it. I guess you could
purge tetex-bin without any error message. That took away
/var/lib/texmf/web2c and make tetex-extra fail.
We remove /var/lib/texmf/web2c, cause there are generated files in it
and doing rm -rf is more easy than figuring out which files are
generated, remove them one by one and leave the rest to dpkg.
The patch from Matt Zimmerman should fix that, thanks!
In general: Is it more clean to do an
   find /var/lib/texmf/web2c -name $filenames
in prerm instead of an rm -rf in postrm? It won't help in this
situation, cause dpkg will remove /var/lib/texmf/web2c anyway.

> Then the extraction of libxml2-dev failed for some unrelated reason
> and after this tetex-extra cannot be removed because afais the
> postrm relies on data the postinst (not executed, see above)
> generates?
> 
postrm should write to /var/lib/texmf/web2c, yes.

H.
-- 
sigmentation fault



Reply to: