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

Re: Bug#27917: apt: doesn't handle virtual packages nicely



reassign 27917 netpbm
thank you

>>>>> "gorgo" == gorgo  <gorgo@nokia.hu> writes:

    gorgo> Package: apt Version: 0.1.6

    gorgo> # apt-get install netpbm Updating package status
    gorgo> cache...done Checking system integrity...ok The following
    gorgo> extra packages will be installed: netpbm1 bc The following
    gorgo> NEW packages will be installed: netpbm1 netpbm bc 0
    gorgo> packages upgraded, 3 newly installed, 0 to remove and 115
    gorgo> not upgraded.  Sorry, but the following packages are broken
    gorgo> - this means they have unmet dependencies: netpbm:
    gorgo> Depends:c-shell

    gorgo> c-shell is provided by tcsh and csh. I understand that apt
    gorgo> should not choose one of them and install it, but at least
    gorgo> it should tell about them to the user so he can after that
    gorgo> do an apt-get install netpbm [t]csh

This is a bug in netpbm.

Policy says that packages that depend on virtual packages **MUST**
give a default choice first, like so:

Depends: (tcsh | c-shell)

Otherwise there's no way in hell APT can just randomly choose one of
the many packages that provides c-shell.

Here's the relevant section of policy:

8.6 Defaults for satisfying dependencies - ordering

   Ordering is significant in dependency fields.

   Usually dselect will suggest to the user that they select the package
   with the most `fundamental' class (eg, it will prefer Base packages to
   Optional ones), or the one that they `most wanted' to select in some
   sense.

   In the absence of other information dselect will offer a default
   selection of the first named package in a list of alternatives.

   However, there is no way to specify the `order' of several packages
   which all provide the same thing, when that thing is listed as a
   dependency.

   Therefore a dependency on a virtual package should contain a concrete
   package name as the first alternative, so that this is the default.

   For example, consider the set of packages:

Package: glibcdoc
Recommends: info-browser

Package: info
Provides: info-browser

Package: emacs
Provides: info-browser
   
   If emacs and info both have the same priority then dselect's choice is
   essentially random. Better would be

Package: glibcdoc
Recommends: info | info-browser

   so that dselect defaults to selecting the lightweight standalone info
   browser.

Ben

-- 
Brought to you by the letters L and N and the number 5.
"Mmm.. slanty.." -- Homer Simpson
Debian GNU/Linux -- where do you want to go tomorrow? http://www.debian.org/
I'm on FurryMUCK as Che, and EFNet and YiffNet IRC as Che_Fox.


Reply to: