#401835 aptitude: installed packages depend on order of commandline

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Date:
2015-05-19 07:54:28 UTC
Severity:
minor
#401835#5
Date:
2006-12-06 09:19:56 UTC
From:
To:
package: aptitude
version: 0.4.3-1
severity: minor

Hello!

It has caught my eye that the packages which are automatically installed
by aptitude depend on the order in which the package names are entered
at the command line.

I want to install both 'xorg' and 'gnome-desktop-environment' packages
in a freshly debootstrap'd chroot:

(1)
        # aptitude install xorg gnome-desktop-environment
        (...)
        0 packages upgraded, 547 newly installed, 0 to remove and 0 not
        upgraded.

vs.

(2)
        # aptitude install gnome-desktop-environment xorg
        (...)
        0 packages upgraded, 545 newly installed, 0 to remove and 0 not
        upgraded.

The two additional packages in (1) are 'xbitmaps' and 'xterm' (xbitmaps
is pulled in by xterm).

Please note that xterm is a dependency of xorg that can (and should) be
satisfied alternatively by any other package providing
x-terminal-emulator, in this case gnome-terminal.

I consider it a bug that aptitude does not realise that this dependency
is already satisfied in the (1) case above.

Thank you for your effort!

Cheers,
Fabian

#401835#10
Date:
2006-12-06 13:18:42 UTC
From:
To:
...

But gnome-terminal in turn depends on libraries which are not part of
xorg, so it would be unsuitable as a dependency.  (rxvt might, kterm
might, none of the other x-terminal-emulators that come to mind would
be suitable).

#401835#15
Date:
2006-12-08 08:54:58 UTC
From:
To:
Am Mittwoch, den 06.12.2006, 08:18 -0500 schrieb Thomas Dickey:

Yes, sure. Sorry, I think my bug report was misleading. Of course
aptitude should not install any random alternative package providing
'x-terminal-emulator' instead of 'xterm'. BUT aptitude should recognize
that another package which I explicitely wish to be installed already
satisfies this dependency.

And aptitude can recognize this:

'aptitude install gnome-desktop-environment xorg' installs 545 new
packages, while 'aptitude install xorg gnome-desktop-environment'
installs 547 new packages. The two additional packages are 'xterm' and
its dependency 'xbitmaps'.

So in the first case aptitude recognizes that xorg's dependency on
'xterm | x-terminal-emulator' is already satisfied by another package
(in this case: its dependency 'gnome-terminal') and does not install
'xterm' additionally.

Let's stay with your examples:

'aptitude install rxvt xorg' installs 125 packages, while
'aptitude install xorg rxvt' installs 127 packages. The two additional
packages are 'xterm' and 'xbitmaps'.

'aptitude install kterm xorg' installs 128 packages, while
'aptitude install xorg kterm' installs 130 packages. Again the two
additional packages are 'xterm' and 'xbitmaps'.

So xorg's dependency 'xterm | x-terminal-emulator' is somehow double
satisfied if the package providing 'x-terminal-emulator' appears behind
'xorg' in the command line.

I consider this a bug!

Aptitude should install only the required number of dependencies
independent of the order in which packages are typed on the command
line.

Thank you!

Cheers,
Fabian

#401835#20
Date:
2007-03-09 02:11:17 UTC
From:
To:
  This is a fairly fundamental consequence of how apt's dependency
resolution works.  Fixing it would require rewriting the code that does
recursive resolution in apt, or replacing it with an aptitude-specific
version.

  This is an interesting problem to solve, so I'll leave it open, but
I'm marking it wontfix due to the fact that I don't see fixing it in the
near future.

  Daniel