[Aptitude-devel] Bug#760610: aptitude: duplicate entries in (reverse) dependencies list

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Thu Jan 28 19:14:21 UTC 2016


Control: tags -1 + pending


Hi Rogier,

2014-09-06 00:34 Rogier:
>Package: aptitude
>Version: 0.6.11-1
>Severity: minor
>
>Dear Maintainer,
>
>For some packages, aptitude may list a (reverse) dependency multiple times
>in the dependency list. This happens when two or more dependencies directly
>or indirectly resolve to the same package.
>
>Example:
>About 700-800 (estimated) packages depend on debconf. Currently, the majority
>use the following dependency declaration:
>	Depends: [...] debconf (>= 0.5) | debconf-2.0 [...]
>As the package 'debconf' actually provides 'debconf-2.0' as well, aptitude ends
>up including debconf twice in the list of dependencies.
>
>For the reverse dependencies, the same holds: For instance, the reverse dependency
>list of debconf includes almost all packages twice, and some three times because of
>this. This results in a list of about 1600 reverse dependencies for debconf.
>
>Packages that end up being listed three times in debconf's reverse dependency list,
>seem to have the following dependency declaration:
>	Depends: [...] debconf, [...] debconf (>= 0.5) | debconf-2.0 [...]
>(based on a sample of a few packages that I checked)
>
>It would be nice if, where possible, identical packages were not listed multiple
>times in (reverse) dependency lists.

Thanks for the report.

I think that the case of the reverse-dependencies is the really
problematic one.

The "direct" dependencies are often much less, for one; and the
alternative dependencies are not always virtual packages so they're
quite evident, or there is only one extra item listed (so having 4
instead of 3 is not that bad and also very apparent why it happens), or
the dependency is on one virtual package with many different package
names, in which which are also quite apparent what's going on.

Examples:

    --\ sbuild | xdeb | pdebuild-cross (UNSATISFIED)
  p     sbuild 0.68.0-1
  p     sbuild 0.68.0-1.0~exp1
  p     xdeb 0.6.6
   
    --\ awk
  i     gawk 1:4.1.3+dfsg-0.1
  p     gawk:i386 1:4.1.3+dfsg-0.1
  i A   mawk 1.3.3-17
  p     mawk:i386 1.3.3-17
  p     original-awk 2012-12-20-5
  p     original-awk:i386 2012-12-20-5
    
    --\ phonon-backend-vlc | phonon-backend
  p     phonon-backend-gstreamer 4:4.8.2-2
  p     phonon-backend-null 4:4.8.3-2
  i     phonon-backend-vlc 0.8.2-1
  i     phonon-backend-vlc 0.8.2-1
    
    --\ Suggests (2)
      --\ default-mta | mail-transport-agent
  p     citadel-mta 9.01-1+b1
  p     courier-mta 0.75.0-10
  p     dma 0.9-1+b1
  p     dma:i386 0.9-1+b1
  p     esmtp-run 1.2-12
  p     exim4-daemon-heavy 4.86-7+b2
  p     exim4-daemon-heavy 4.87~RC3-1
  p     exim4-daemon-light 4.86-7+b2
  p     exim4-daemon-light 4.86-7+b2
  p     exim4-daemon-light 4.87~RC3-1
  p     exim4-daemon-light 4.87~RC3-1
  p     masqmail 0.3.4-1
  i     msmtp-mta 1.6.3-1
  p     nullmailer 1:1.13-1+b1
  p     opensmtpd 5.7.3p1-1
  p     postfix 2.11.3-1+b1
  p     qmail-run 2.0.2+nmu1
  p     sendmail-bin 8.15.2-3
  p     ssmtp 2.64-8
      

Avoiding to add versions to the trees is relatively quite costly in
general for relatively little gain, in my opinion (in computing
run-time, as well as implementation+maintenance time).  Comparing pkg
name and version is not enough -- there can be cases of multiple
repositories with same pkg name and version, but other different
fields/origin URL/etc, but this is rare, so we would be doing lots of
computations all the time only for a some cases where package is
repeated because of the overlapping dependency.

If this had to change perhaps it would make sense to change it like the
next example.  But showing dependencies like the above is quite
stablished and central part in aptitude, and probably people prefer it
that way, because there are few or no complaints about this.

Hypotetical examples:

    --\ phonon-backend-vlc | phonon-backend
      --\ phonon-backend-vlc
  i     phonon-backend-vlc 0.8.2-1
      --\ phonon-backend
  p     phonon-backend-gstreamer 4:4.8.2-2
  p     phonon-backend-null 4:4.8.3-2
  i     phonon-backend-vlc 0.8.2-1

    --\ awk
      --\ gawk
  i     gawk 1:4.1.3+dfsg-0.1
  p     gawk:i386 1:4.1.3+dfsg-0.1
      --\ mawk
  i A   mawk 1.3.3-17
  p     mawk:i386 1.3.3-17
      --\ original-awk
  p     original-awk 2012-12-20-5
  p     original-awk:i386 2012-12-20-5
    
However, as I said, people probably prefer the current way because in
the vast majority of cases this is not a problem, and showing the extra
branch/nodes makes it longer, more bulky and less "clean" -- perhaps
more annoying than the repeated entries.  I actually prefer the examples
far above of "phonon" and "awk" than these hypotetical ones below.


Now, I think that the case of reverse dependencies is more problematic,
not only because of special cases like "debconf" with hundreds of
dependencies repeated, but because one never knows if the dependency is
specifically exactly on the package that we are looking at, or in a
provided package (and if there are alternatives, so e.g. one can
uninstall the current package and keep another alternative installed),
without jumping to the dependency's info page and expanding those trees.

This doesn't happen in a handful of cases, but in many virtual packages:
the mentioned debconf, mail-transport-agent, www-browser...


So, in summary I changed it to do this, which is IMO more manageable and
incidentally solves the problem of the repeated entries:

  --\ Packages which depend on exim4-daemon-light (18)
    --\ Depends (6)
  p     exim4 4.86-7
  p     exim4 4.87~RC3-1
  p     exim4-daemon-light-dbg 4.86-7+b2
  p     exim4-daemon-light-dbg 4.87~RC3-1
  p     gross 1.0.2-4
  p     hylafax-server 3:6.0.6-6
    --\ Depends on provided default-mta (21)
  p     altermime 0.3.10-7
  p     backuppc 3.3.1-2
  p     bcron-run 0.10-3
  i     bsd-mailx 8.1.2-0.20150408cvs-1
  p     courier-imap 4.16.2+0.75.0-10
  p     courier-maildrop 2.8.3+0.75.0-10
  [...]
    --- Depends on provided exim4-localscanapi-2.0 (1)
    --\ Depends on provided mail-transport-agent (62)
  p     altermime 0.3.10-7
  p     backuppc 3.3.1-2
  p     bcron-run 0.10-3
  p     biabam 0.9.7-7
  p     broctl 1.4-1
  i     bsd-mailx 8.1.2-0.20150408cvs-1
  p     buildd 0.68.0-1
  p     buildd 0.68.0-1.0~exp1
  p     courier-imap 4.16.2+0.75.0-10
  p     courier-maildrop 2.8.3+0.75.0-10
    --- Recommends (1)
    --- Recommends on provided default-mta (14)
    --- Recommends on provided mail-transport-agent (42)
    --- Suggests (1)
    --- Suggests on provided default-mta (8)
    --- Suggests on provided mail-transport-agent (33)
    --- Conflicts (4)
    --- Conflicts on provided mail-transport-agent (29)
    --- Breaks (2)
    --- Replaces (4)
    --- Replaces on provided mail-transport-agent (29)


Instead of how it was working until now:

  --\ Packages which depend on exim4-daemon-light (257)
    --- Breaks (2)
    --- Conflicts (33)
    --- Replaces (33)
    --\ Depends (90)
  p     altermime 0.3.10-7
  p     altermime 0.3.10-7
  p     backuppc 3.3.1-2
  p     backuppc 3.3.1-2
  p     bcron-run 0.10-3
  p     bcron-run 0.10-3
  p     biabam 0.9.7-7
  p     broctl 1.4-1
  i     bsd-mailx 8.1.2-0.20150408cvs-1
  i     bsd-mailx 8.1.2-0.20150408cvs-1
  p     buildd 0.68.0-1
  p     buildd 0.68.0-1.0~exp1
  p     courier-imap 4.16.2+0.75.0-10
  p     courier-imap 4.16.2+0.75.0-10
  p     courier-maildrop 2.8.3+0.75.0-10
  p     courier-maildrop 2.8.3+0.75.0-10
  p     courier-pop 0.75.0-10
  p     courier-pop 0.75.0-10
  p     cvs-mailcommit 1.19-2
  [...]
    --- Recommends (57)
    --- Suggests (42)


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list