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

Bug#476951: aptitude: must run apt-listbugs before downloading packages



On Sun, Apr 20, 2008 at 07:40:10PM -0500, Luca Bruno <lethalman88@gmail.com> was heard to say:
> On Sun, 20 Apr 2008 08:01:57 -0700
> Daniel Burrows <dburrows@debian.org> wrote:
> >   apt-listbugs is invoked because it's listed in Dpkg::Pre-Install-Pkgs.
> > This is the hook for commands that are invoked just before dpkg is
> > called to install the new packages.  aptitude doesn't even invoke this
> > directly; it happens behind the scenes when the apt library is told to
> > run dpkg.
> > 
> >   In order to get the effect you want, you would need a new hook that
> > ran before any download started, and aptitude would have to explicitly
> > ask to invoke it (as would all the other apt frontends).
> 
> It seems that this might lead to complex changes.
> Do you think this is the only right thing to do?

  If it needs to be in all frontends, it should be in apt.

  If it's in apt, the right way to do it (since we certainly don't want apt
to know about listbugs) is to add a new hook.

  Since there isn't any code that's guaranteed to run before a download
for the purpose of installing packages and never at any other time, the
frontend will have to explicitly invoke this new hook.  (note that this
is true even if there's a listbugs-specific function to invoke; the
problem is that the backend library doesn't know when the user is about
to install packages).

  IMO, this should wait until we have a "standard" download harness,
maybe based on the one I wrote for aptitude -- after lenny is out I hope to
talk about this with the other apt maintainers.  That would add a place to
configure a lot of things like this (all frontends would need to be modified
to run in the harness, but only once).

  Daniel



Reply to: