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

Bug#207400: Notes



On Wed, Aug 27, 2003 at 09:09:01AM +0200, Filip Van Raemdonck <mechanix@debian.org> was heard to say:
> On Tue, Aug 26, 2003 at 11:40:23PM -0600, Jason Gunthorpe wrote:
> >
> (apt-pkg changes)
> >
> >   - IsCritical->IsImportant... The Critical/Important differentiation
> >     never seems to have panned out. The distinction was ment to allow a
> >     policy routine to manage things like suggests. If connectiva says
> >     removing it makes things much faster then might as well, but remove
> >     _all_ traces of IsImportant.
> 
> That's rather "IsImportantDep", isn't it?
> I'm not all too familiar with the distinction between these two, but
> gnome-apt uses the latter rather than IsCritical. What _is_ the
> difference?

  From memory and a brief look at some code:

  IsCritical returns true iff the dependency is one that must be
resolved for system integrity, such as Depends or Predepends (there may
be more conditions I've forgotten)

  IsImportantDep is a virtual method on Policy which returns true if the
dependency should be enforced when first installing a package.  It
defaults to being equivalent to IsCritical().  It's used when
auto-installing dependencies of a package.

> It's probably more of a problem for aptitude. Downloading it's source and
> grepping reveals that it frequently uses both, and ISTR aptitude having
> more complete support for policies than any other apt frontend (dselect
> left aside, but it doesn't use apt-pkg)

  aptitude uses IsCritical to test whether dependencies are critical
(mostly for output purposes IIRC), and overrides IsImportantDep to force
recommended packages to be installed.  (there's also a suspicious-looking
use of IsImportantDep in matchers.cc, which should maybe morph to IsCritical)

> Downloading and grepping some more: synaptic appears to use only
> IsImportantDep, the (now obsolete) stormpkg uses both, deity (which isn't
> in the archive anymore but it's maintainer has expressed to be still
> interested in getting it back in sometime) uses only IsImportantDep.

  I'd imagine they all do something similar with Recommends -- it's the
obvious (and, from Jason's comments above, intended) way of implementing
that.

  Daniel

-- 
/-------------------- Daniel Burrows <dburrows@debian.org> -------------------\
|                     All generalizations are dangerous.                      |
\------- (if (not (understand-this)) (go-to http://www.schemers.org)) --------/



Reply to: