Debian Bug report logs - #626599
Use --no-triggers by default and let dpkg find out the configuration order

version graph

Package: apt; Maintainer for apt is APT Development Team <deity@lists.debian.org>; Source for apt is src:apt.

Reported by: Raphael Hertzog <hertzog@debian.org>

Date: Fri, 13 May 2011 14:45:01 UTC

Severity: normal

Merged with 692966

Found in version apt/0.8.14.1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, joeyh@debian.org, psusi@cfl.rr.com, debian-dpkg@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Fri, 13 May 2011 14:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
New Bug report received and forwarded. Copy sent to joeyh@debian.org, psusi@cfl.rr.com, debian-dpkg@lists.debian.org, APT Development Team <deity@lists.debian.org>. (Fri, 13 May 2011 14:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: submit@bugs.debian.org
Subject: Use --no-triggers by default and let dpkg find out the configuration order
Date: Fri, 13 May 2011 16:41:45 +0200
Package: apt
Version: 0.8.14.1

On Mon, 01 Nov 2010, Joey Hess wrote:
> Phillip Susi wrote:
> > I've noticed triggers being invoked repeatedly during upgrades rather
> > than once at the end, as they are supposed to.  I started looking at
> > /var/log/dpkg.log to try and figure out why.
> 
> Becaue apt has not been changed to tell dpkg to defer trigger processing,
> and to them run them all at the end. Or rather, it has, see
> http://bugs.debian.org/473461 -- but they do not have the options
> enabled by default.
> 
> DPkg
> {
>    // let apt aggressivly use dpkg triggers
>    NoTriggers "true";
>    NoConfigure "true";
>    ConfigurePending "true";

That's not the recommended combination currently, man apt.conf gives:
          DPkg::NoTriggers "true";
          PackageManager::Configure "smart";
          DPkg::ConfigurePending "true";
          DPkg::TriggersPending "true";

Since we're at the start of the wheezy cycle, I believe it's a good time
to enable those options. Dear apt maintainers, can you do that please ?

I also like that the options tell APT to rely on dpkg to configure stuff
in the correct order instead of doing it itself and getting it wrong in
some cases... cf the numerous bug reports here:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Fri, 13 May 2011 15:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Kalnischkies <kalnischkies+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Fri, 13 May 2011 15:27:03 GMT) Full text and rfc822 format available.

Message #10 received at 626599@bugs.debian.org (full text, mbox):

From: David Kalnischkies <kalnischkies+debian@gmail.com>
To: Raphael Hertzog <hertzog@debian.org>, 626599@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Fri, 13 May 2011 17:24:00 +0200
On Fri, May 13, 2011 at 16:41, Raphael Hertzog <hertzog@debian.org> wrote:
>          DPkg::NoTriggers "true";
>          PackageManager::Configure "smart";
>          DPkg::ConfigurePending "true";
>          DPkg::TriggersPending "true";
>
> Since we're at the start of the wheezy cycle, I believe it's a good time
> to enable those options. Dear apt maintainers, can you do that please ?

I personally use them for quiet a while now in this combination with no
issues*, but the differences is barely noticeable - also thanks to the
need for DPkg::TriggersPending=true (needed to "fix" dpkg "bug" #526774)
and - to quote apt.conf manpage - "also it breaks the progress reporting so
all frontends will currently stay around half (or more) of the time in the
100% state while it actually configures all packages.".

Further more it breaks applications listening on the hooks (apt-listbugs comes
to mind) as most of they act on scheduled 'Conf' messages -- which doesn't
exist if APT doesn't plan them obviously. Could be fixed maybe with looking at
'Inst', but i am not sure why they are looking for 'Conf' in the first place…

It was discussed at the UDS today [0], too, where Michael said he would
try it with ubuntu's autoupgradetester to see if it would cause regressions
in a larger testdeployment then just my little laptop here.

Note through that triggers like man-db and soon-to-be bash-completion are run
all the time as literally every package ships a manpage (or at least should)
and at least quiet a few a binary in /usr/bin and alike. Maybe the deployment
of triggers which doesn't put the activating package(s) into trigger-awaiting
would be useful for those as they are non-mission-critical…


Best regards

David Kalnischkies

P.S.: Where does this discussion started off? Pointers anyone?

[0] https://blueprints.launchpad.net/ubuntu/+spec/desktop-o-faster-update
http://summit.ubuntu.com/uds-o/meeting/desktop-o-faster-update/




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Fri, 13 May 2011 16:24:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phillip Susi <psusi@cfl.rr.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Fri, 13 May 2011 16:24:06 GMT) Full text and rfc822 format available.

Message #15 received at submit@bugs.debian.org (full text, mbox):

From: Phillip Susi <psusi@cfl.rr.com>
To: Raphael Hertzog <hertzog@debian.org>, 626599@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Fri, 13 May 2011 12:12:36 -0400
On 5/13/2011 10:41 AM, Raphael Hertzog wrote:
> That's not the recommended combination currently, man apt.conf gives:
>            DPkg::NoTriggers "true";
>            PackageManager::Configure "smart";
>            DPkg::ConfigurePending "true";
>            DPkg::TriggersPending "true";

I actually had the "smart" option on my system, and so I also added it 
to my vm test install, and that is when I ran into errors during the 
upgrade.  When I tried again without the "smart" option, I did not get 
errors.

> I also like that the options tell APT to rely on dpkg to configure stuff
> in the correct order instead of doing it itself and getting it wrong in
> some cases... cf the numerous bug reports here:
> https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595

What option is that?  This package XXX is already installed and 
configured error is one of the problems I saw.




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Fri, 13 May 2011 16:24:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phillip Susi <psusi@cfl.rr.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Fri, 13 May 2011 16:24:10 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Fri, 13 May 2011 21:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Fri, 13 May 2011 21:21:03 GMT) Full text and rfc822 format available.

Message #25 received at 626599@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: David Kalnischkies <kalnischkies+debian@gmail.com>
Cc: 626599@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Fri, 13 May 2011 23:17:27 +0200
On Fri, 13 May 2011, David Kalnischkies wrote:
> I personally use them for quiet a while now in this combination with no
> issues*, but the differences is barely noticeable - also thanks to the
> need for DPkg::TriggersPending=true (needed to "fix" dpkg "bug" #526774)

I have put that bug in my TODO list, I'll try to look into it.

> and - to quote apt.conf manpage - "also it breaks the progress reporting so
> all frontends will currently stay around half (or more) of the time in the
> 100% state while it actually configures all packages.".

This should be fixable, no? dpkg reports what it does via --status-fd and
APT knows how many packages there are to configure... (even if it doesn't
configure them one by one)

> Further more it breaks applications listening on the hooks (apt-listbugs comes
> to mind) as most of they act on scheduled 'Conf' messages -- which doesn't
> exist if APT doesn't plan them obviously. Could be fixed maybe with looking at
> 'Inst', but i am not sure why they are looking for 'Conf' in the first place…

What hook is that ? Or is that simply analyzing the output of the upgrade plan ?

> Note through that triggers like man-db and soon-to-be bash-completion are run
> all the time as literally every package ships a manpage (or at least should)
> and at least quiet a few a binary in /usr/bin and alike. Maybe the deployment
> of triggers which doesn't put the activating package(s) into trigger-awaiting
> would be useful for those as they are non-mission-critical…

Yes, I should implement this as well.

> P.S.: Where does this discussion started off? Pointers anyone?

It's an old thread: http://lists.debian.org/4CCB1055.5020601@cfl.rr.com

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Sat, 14 May 2011 09:58:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Andres Klode <jak@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Sat, 14 May 2011 09:58:23 GMT) Full text and rfc822 format available.

Message #30 received at 626599@bugs.debian.org (full text, mbox):

From: Julian Andres Klode <jak@debian.org>
To: Raphael Hertzog <hertzog@debian.org>, 626599@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Sat, 14 May 2011 11:56:46 +0200
On Fri, 2011-05-13 at 16:41 +0200, Raphael Hertzog wrote:
> I also like that the options tell APT to rely on dpkg to configure stuff
> in the correct order instead of doing it itself and getting it wrong in
> some cases... cf the numerous bug reports here:
> https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595
I'd personally like to see dpkg take over all ordering itself, so we
just have to specify what to install and what to remove and let dpkg
deal with the rest. This requires action switching in dpkg:

  dpkg -i a.deb b.deb      # install a b
  dpkg -i a.deb b.deb -r c d # install a.deb, b.deb, remove c and d

Then we could drop all that complexity from our layer, and have the same
ordering for other package managers such as cupt or smart as well.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.






Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Sat, 14 May 2011 21:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Sat, 14 May 2011 21:45:05 GMT) Full text and rfc822 format available.

Message #35 received at 626599@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: David Kalnischkies <kalnischkies+debian@gmail.com>
Cc: 626599@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Sat, 14 May 2011 23:41:08 +0200
On Fri, 13 May 2011, Raphael Hertzog wrote:
> On Fri, 13 May 2011, David Kalnischkies wrote:
> > I personally use them for quiet a while now in this combination with no
> > issues*, but the differences is barely noticeable - also thanks to the
> > need for DPkg::TriggersPending=true (needed to "fix" dpkg "bug" #526774)
> 
> I have put that bug in my TODO list, I'll try to look into it.

Pushed a fix in git (will thus be in dpkg 1.16.1). You might want to make
it a no-op if you detect the correct version of dpkg.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Sat, 14 May 2011 22:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Sat, 14 May 2011 22:03:02 GMT) Full text and rfc822 format available.

Message #40 received at 626599@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: 626599@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Sun, 15 May 2011 00:02:01 +0200
Hi,

On Fri, 13 May 2011, Phillip Susi wrote:
> On 5/13/2011 10:41 AM, Raphael Hertzog wrote:
> >That's not the recommended combination currently, man apt.conf gives:
> >           DPkg::NoTriggers "true";
> >           PackageManager::Configure "smart";
> >           DPkg::ConfigurePending "true";
> >           DPkg::TriggersPending "true";
> 
> I actually had the "smart" option on my system, and so I also added
> it to my vm test install, and that is when I ran into errors during
> the upgrade.  When I tried again without the "smart" option, I did
> not get errors.

Interesting.

> >I also like that the options tell APT to rely on dpkg to configure stuff
> >in the correct order instead of doing it itself and getting it wrong in
> >some cases... cf the numerous bug reports here:
> >https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595
> 
> What option is that?  This package XXX is already installed and
> configured error is one of the problems I saw.

I was referring to “DPkg::ConfigurePending "true"”.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#626599; Package apt. (Mon, 06 Aug 2012 06:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Mon, 06 Aug 2012 06:45:04 GMT) Full text and rfc822 format available.

Message #45 received at 626599@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: David Kalnischkies <kalnischkies+debian@gmail.com>
Cc: 626599@bugs.debian.org
Subject: Re: Bug#626599: Use --no-triggers by default and let dpkg find out the configuration order
Date: Mon, 6 Aug 2012 08:43:02 +0200
Hi,

On Fri, 13 May 2011, Raphael Hertzog wrote:
> On Fri, 13 May 2011, David Kalnischkies wrote:
> > Further more it breaks applications listening on the hooks (apt-listbugs comes
> > to mind) as most of they act on scheduled 'Conf' messages -- which doesn't
> > exist if APT doesn't plan them obviously. Could be fixed maybe with looking at
> > 'Inst', but i am not sure why they are looking for 'Conf' in the first place…
> 
> What hook is that ? Or is that simply analyzing the output of the
> upgrade plan ?

Note that such packages could switch to use a dpkg hook --pre-invoke or
--post-invoke, or even --status-logger.

As far as progress reporting is broken, why can't apt make an estimate
based on the number of packages that dpkg already configured ? After all
you get live information from dpkg about what it's doing.

Any way, coming back to the suggestion, I believe it's time for APT to
change its default here, even for wheezy (see related discussion in
#680626). On the dpkg side, we implemented most of the possible
improvements already (interest-noawait and the fix you requested).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/



Merged 626599 692966 Request was from Raphael Hertzog <hertzog@debian.org> to 692966-submit@bugs.debian.org. (Mon, 12 Nov 2012 07:36:05 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 14:27:42 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.