这是indexloc提供的服务,不要输入任何密码

Debian Bug report logs - #378009
dpkg: --auto-deconfigure is not transitive

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Ian Jackson <iwj@ubuntu.com>

Date: Wed, 12 Jul 2006 16:03:13 UTC

Severity: normal

Found in version dpkg/1.13.22

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#378009; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Ian Jackson <iwj@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <team@dpkg.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <iwj@ubuntu.com>
To: submit@bugs.debian.org
Subject: auto-deconfigure is not transitive
Date: Wed, 12 Jul 2006 16:55:10 +0100
Package: dpkg
Version: 1.13.22

If
 A -Conflicts/Replaces-> B <-Depends- C <-Depends- D

and you start with B,C,D installed, then installing A automatically
removes B (which is correct) and deconfigures C (which is correct) but
fails to deconfigure D (which is not correct).

See transcript below.  (Ignore the Not-Breaks field; it's not relevant
and is to do with another test I'm doing with this set of test
packages.)

Ian.

root@anarres:/work/dpkg-tests # dpkg -l 'iwj-test-package-[abcd]'
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  [tabled edited for clarity -iwj]
+++-======================================================
pn  iwj-test-package-a  <none>  (no description available)
pn  iwj-test-package-b  <none>  (no description available)
pn  iwj-test-package-c  <none>  (no description available)
pn  iwj-test-package-d  <none>  (no description available)
root@anarres:/work/dpkg-tests # dpkg -i d.deb c.deb b.deb 
Selecting previously deselected package iwj-test-package-d.
(Reading database ... 124855 files and directories currently installed.)
Unpacking iwj-test-package-d (from d.deb) ...
Selecting previously deselected package iwj-test-package-c.
Unpacking iwj-test-package-c (from c.deb) ...
Selecting previously deselected package iwj-test-package-b.
Unpacking iwj-test-package-b (from b.deb) ...
Setting up iwj-test-package-b (0.passwd) ...
b postinst configure 

Setting up iwj-test-package-c (0.passwd) ...
c postinst configure 

Setting up iwj-test-package-d (0.passwd) ...
d postinst configure 

root@anarres:/work/dpkg-tests # dpkg -iB a.deb 
Selecting previously deselected package iwj-test-package-a.
dpkg: considering removing iwj-test-package-b in favour of iwj-test-package-a ...
dpkg: yes, will remove iwj-test-package-b in favour of iwj-test-package-a.
(Reading database ... 124859 files and directories currently installed.)
Unpacking iwj-test-package-a (from a.deb) ...
De-configuring iwj-test-package-c, so that we can remove iwj-test-package-b ...
c prerm deconfigure in-favour iwj-test-package-a 0.passwd removing iwj-test-package-b 0.passwd
b prerm remove in-favour iwj-test-package-a 0.passwd
Setting up iwj-test-package-a (0.passwd) ...
dpkg: dependency problems prevent configuration of iwj-test-package-c:
 iwj-test-package-c depends on iwj-test-package-b; however:
  Package iwj-test-package-b is not installed.
dpkg: error processing iwj-test-package-c (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 iwj-test-package-c
root@anarres:/work/dpkg-tests # dpkg -s iwj-test-package-d
Package: iwj-test-package-d
Status: install ok installed
Maintainer: iwj@ubuntu.com
Architecture: all
Version: 0.passwd
Depends: iwj-test-package-c
Description: test package
Not-Breaks: nothing-we-know-about
root@anarres:/work/dpkg-tests # for f in a b c d; do echo; echo ===$f===; dpkg -I $f.deb ; done

===a===
 new debian package, version 2.0.
 size 682 bytes: control archive= 295 bytes.
     176 bytes,     7 lines      control              
     145 bytes,     6 lines      control~             
 Package: iwj-test-package-a
 Version: 0.passwd
 Description: test package
 Maintainer: iwj@ubuntu.com
 Architecture: all
 Replaces: iwj-test-package-b
 Conflicts: iwj-test-package-b

===b===
 new debian package, version 2.0.
 size 770 bytes: control archive= 374 bytes.
     151 bytes,     6 lines      control              
     151 bytes,     6 lines      control~             
      31 bytes,     2 lines   *  postinst             #!/bin/sh
      28 bytes,     2 lines   *  prerm                #!/bin/sh
 Package: iwj-test-package-b
 Version: 0.passwd
 Not-Breaks: nothing-we-know-about
 Description: test package
 Maintainer: iwj@ubuntu.com
 Architecture: all

===c===
 new debian package, version 2.0.
 size 814 bytes: control archive= 423 bytes.
     179 bytes,     7 lines      control              
     179 bytes,     7 lines      control~             
      31 bytes,     2 lines   *  postinst             #!/bin/sh
      31 bytes,     2 lines      postinst~            #!/bin/sh
      28 bytes,     2 lines   *  prerm                #!/bin/sh
      28 bytes,     2 lines      prerm~               #!/bin/sh
 Package: iwj-test-package-c
 Version: 0.passwd
 Not-Breaks: nothing-we-know-about
 Description: test package
 Maintainer: iwj@ubuntu.com
 Architecture: all
 Depends: iwj-test-package-b

===d===
 new debian package, version 2.0.
 size 812 bytes: control archive= 418 bytes.
     179 bytes,     7 lines      control              
     179 bytes,     7 lines      control~             
      31 bytes,     2 lines   *  postinst             #!/bin/sh
      31 bytes,     2 lines   *  postinst~            #!/bin/sh
      28 bytes,     2 lines   *  prerm                #!/bin/sh
      28 bytes,     2 lines   *  prerm~               #!/bin/sh
 Package: iwj-test-package-d
 Version: 0.passwd
 Not-Breaks: nothing-we-know-about
 Description: test package
 Maintainer: iwj@ubuntu.com
 Architecture: all
 Depends: iwj-test-package-c
root@anarres:/work/dpkg-tests #



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#378009; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Ian Jackson <ian@davenant.greenend.org.uk>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. (full text, mbox, link).


Message #10 received at 378009@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <ian@davenant.greenend.org.uk>
To: 378009@bugs.debian.org
Subject: Re: auto-deconfigure is not transitive
Date: Thu, 13 Jul 2006 15:29:47 +0100
Ian Jackson writes ("auto-deconfigure is not transitive"):
> Package: dpkg
> Version: 1.13.22
> 
> If
>  A -Conflicts/Replaces-> B <-Depends- C <-Depends- D
> 
> and you start with B,C,D installed, then installing A automatically
> removes B (which is correct) and deconfigures C (which is correct) but
> fails to deconfigure D (which is not correct).

I think I may be confused here.

We already have the situation that if
  B <-Depends- C
and you upgrade B, then B goes through half-installed and unpacked
without any (dpkg-recorded or -implemented) effect on C.

This counterexample shows that we don't
  B <-Depends- C && installed(C) => installed(B)
as an invariant in general, and I think it needn't apply in this case
either.  Deconfiguring due to --auto-deconfigure is less potentially
damaging than installation of a new package.

Ian.



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <team@dpkg.org>:
Bug#378009; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Florent Rougon <f.rougon@free.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <team@dpkg.org>. (full text, mbox, link).


Message #15 received at 378009@bugs.debian.org (full text, mbox, reply):

From: Florent Rougon <f.rougon@free.fr>
To: 378009@bugs.debian.org, Ian Jackson <ian@davenant.greenend.org.uk>
Cc: debian-tex-maint@lists.debian.org
Subject: Re: auto-deconfigure is not transitive
Date: Sat, 05 Aug 2006 16:44:07 +0200
Ian Jackson wrote ("auto-deconfigure is not transitive"):

> This counterexample shows that we don't [preserve]
>   B <-Depends- C && installed(C) => installed(B)
> as an invariant in general

This is something that bothers me. Basically, it means there is no way
to programmatically check (e.g., from a maintainer script) whether a
given package is actually usable! :-/
Or am I mistaken?

For a real issue where this is a concern, see:

  http://lists.debian.org/debian-tex-maint/2006/08/msg00052.html  

Regards,

-- 
Florent



Changed Bug title to 'dpkg: --auto-deconfigure is not transitive' from 'auto-deconfigure is not transitive'. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sat, 02 Mar 2019 16:39:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 27 15:23:15 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.