Apt performs some actions multiple times when once would suffice

Bug #202459 reported by David Jaša
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned
dpkg (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I've noticed that if I just ask aptitude to purge kernel packages (packages linux-image-, linux-restricted-modules- and linux-ubuntu-modules-2.6.24-11-generic), apt/dpkg is invoking twice:

1) update-initramfs which doesn't need to be invoked at all (or once at the end when it's got nothing to do)
2) update-grub which needs to be invoked just once at the end

(you can see output of aptitude in attachment). I think that this is reason, why has bug #44535 so bad impact.

Tags: cft-2.6.27
Revision history for this message
David Jaša (dejv) wrote :
description: updated
Revision history for this message
David Jaša (dejv) wrote :

I think it's neither aptitude's nor linux's bug. There are certain actions, which can be run just at the end of apt's actions (update-grub, scrollkeeper-update and maybe others), but there's no way to tell apt to do this, so packager have tu run such action during "setting up" stage of package.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi David,

Per your last comment, do you want to keep this report open or close it out? Thanks.

Changed in linux:
status: New → Incomplete
Revision history for this message
David Jaša (dejv) wrote :

This is bug in debian package management but I'm not sure on which level. And I'd like to keep it opened until it's fixed. :-)

Changed in linux:
status: Incomplete → Confirmed
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Przemek K. (azrael) wrote :

Definitely not a Linux kernel bug. It's a bug in apt or dpkg. One of them should check for such repeatable actions invoked by packages and run them once at the end.

Revision history for this message
Evgeny Kapun (abacabadabacaba) wrote :

This is bug in apt. This is because apt-get invokes dpkg once for each installed/removed package instead of invoking it just once for the whole operation.

Revision history for this message
Tomas Van Verrewegen (tomasvanverrewegen) wrote :

I think this is a reasonably serious bug. I know it has been bugging me for a long time already :)
Example: I just removed 4 obsolete kernel packages, which should be a fairly straightforward operation, but it took more than 5 minutes to complete. Running update-grub with 4 kernels, 3 kernels, 2 kernels, ... It should have finished in 30 seconds. that's a HUGE difference.

Revision history for this message
Raphaël Hertzog (hertzog) wrote :

The required support already exists with triggers. There's no need for any improvement to dpkg. Marking this bug as invalid for dpkg.

Changed in dpkg (Ubuntu):
status: New → Invalid
Revision history for this message
Julian Andres Klode (juliank) wrote :

We use triggers now. Not to full extent, though, as there are some issues, but those are not APT issues.

Changed in apt (Ubuntu):
status: Confirmed → Invalid
Mathew Hodson (mhodson)
affects: debian → ubuntu
Changed in ubuntu:
importance: Unknown → Undecided
status: Won't Fix → New
no longer affects: ubuntu
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.