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

[SOLVED] Re: package fails to install; fails to remove; breaks upgrade of other packages



On 2008-08-26 09:39, Florian Kulzer wrote:
> Try to use "set -x" in the post-installation script and run "dpkg
> --configure anon-proxy" again, maybe that will tell you what is going
> wrong. The script should be here: /var/lib/dpkg/info/dirmngr.postinst

OK. Thanks I did that. It generates this output:

# aptitude reinstall anon-proxy
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages will be REINSTALLED:
  anon-proxy
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and
28 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up anon-proxy (00.05.38+20080710-1) ...
+ set -e
+ EE=/etc/environment
+ '[' -f /etc/default/anon-proxy ']'
+ . /etc/default/anon-proxy
++ PORT=4001
++ CASCADE=mix.inf.tu-dresden.de:443
++ OPTIONS='-a -d -j -r /var/run/anon-proxy/mix.pid -n
mix.inf.tu-dresden.de:443 -p 4001'
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend
/var/lib/dpkg/info/anon-proxy.postinst configure ''
+ set -e
+ EE=/etc/environment
+ '[' -f /etc/default/anon-proxy ']'
+ . /etc/default/anon-proxy
++ PORT=4001
++ CASCADE=mix.inf.tu-dresden.de:443
++ OPTIONS='-a -d -j -r /var/run/anon-proxy/mix.pid -n
mix.inf.tu-dresden.de:443 -p 4001'
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ '[' '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
+ case "$1" in
+ db_get anon-proxy/environment
+ _db_cmd 'GET anon-proxy/environment'
+ IFS=' '
+ printf '%s\n' 'GET anon-proxy/environment'
+ IFS='
'
+ read -r _db_internal_line
+ RET=true
+ case ${_db_internal_line%%[   ]*} in
+ return 0
+ ENV=true
+ db_stop
+ echo STOP
+ getent passwd anon-proxy
+ '[' -n true ']'
+ '[' true '!=' false ']'
+ '[' -e /etc/environment ']'
+ grep -v +ANON_MARK+ /etc/environment
+ grep -vi '^http_proxy'
dpkg: error processing anon-proxy (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 anon-proxy
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done

For what it's worth

ll /etc/environment
-rw-r--r-- 1 root root 0 2008-08-19 19:47 /etc/environment

I delete /etc/environment since it is an empty file anyway. After that
it work. It's now also possible to purge/ install it ok.

I have no idea, how I got that empty /etc/environment, since its
modificaton date does not match with the installation of anon-proxy.

*Florian, thanks a lot for your help!*

I'm not sure, if this behaviour is actually a bug.

/---
rm /etc/environment
touch /etc/environment
aptitude install anon-proxy
\---

reproduces the problem.

/---
rm /etc/environment
aptitude install anon-proxy
aptitude purge anon-proxy
\---

leaves /etc/environment on my system:

/---
10:38:05-root@e13-v21:~# ll /etc/environment
-rw-r--r-- 1 root root 1 2008-08-26 10:37 /etc/environment
\---

This one bit difference (space or newline?) makes the difference,
whether anon-proxy is installable or not.

Cheers,
Johannes

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: