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

Re: Bug#766758: apt: does not process pending triggers



Control: retitle -1 apt: does not process pending triggers
Control: reassign -1 apt
Control: affects -1 dpkg

This should probably be considered an RC bug, but I'll let the apt
maintainers deal with that.

Hi!

On Tue, 2014-10-28 at 06:00:43 +0100, Guillem Jover wrote:
> On Mon, 2014-10-27 at 04:11:33 +0100, Vincent Lefevre wrote:
> > On 2014-10-27 02:44:38 +0100, Guillem Jover wrote:
> > > Let's lower this for now, as this is certainly not critical in any
> > > way, and I don't think it's serious for now, too many unknowns, but
> > > I'll bump it again if it happens to be so.
> > 
> > IMHO, it would be bad if it affected stable.
> 
> It would be an undesirable regression sure, I want to understand
> what's going on first. It could be an issue in how apt invokes dpkg,
> that only showed up now that triggers are only processed when they
> have their dependencies satisfied.

> > > On Mon, 2014-10-27 at 02:14:32 +0100, Vincent Lefevre wrote:
> > > > I've just upgraded another machine, and:
> > [...]
> > > > So, this is similar to the other one.
> > > 
> > > Ok, I know you set the version affecting the other system to 1.17.21,
> > > but is this one too that version? was it upgraded to that on the same
> > > upgrade run?
> > 
> > 1.17.21 too, because I had upgraded dpkg first, then upgraded
> > everything else later.
> 
> Yes, I've got now a reliable reproducer on my kfreebsd-amd64 system.
> It's not processing the man-db triggers because libpipeline1 is not
> configured yet, but I don't know yet why it's not marked as being
> configured in that run. I'll be checking how apt is calling dpkg
> tomorrow, so see where this fails.

Ok, here's the minimal reproducer and analysis:

,---
# apt-get install --reinstall libpipeline1 wget
[…]
(Reading database ... 232896 files and directories currently installed.)
Preparing to unpack .../libpipeline1_1.4.0-1_amd64.deb ...
Unpacking libpipeline1:amd64 (1.4.0-1) over (1.4.0-1) ...
Preparing to unpack .../archives/wget_1.16-1_amd64.deb ...
Unpacking wget (1.16-1) over (1.16-1) ...
Processing triggers for install-info (5.2.0.dfsg.1-5) ...
Setting up libpipeline1:amd64 (1.4.0-1) ...
Setting up wget (1.16-1) ...
Processing triggers for libc-bin (2.19-12) ...
# dpkg -C
The following packages have been triggered, but the trigger processing
has not yet been done.  Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
 man-db               on-line manual pager
`---

,---
# apt-get -o Debug::pkgDPkgPM=true install --reinstall libpipeline1 wget
[…]
/usr/bin/dpkg --status-fd 28 --unpack --auto-deconfigure \
  /var/cache/apt/archives/libpipeline1_1.4.0-1_amd64.deb \
  /var/cache/apt/archives/wget_1.16-1_amd64.deb
/usr/bin/dpkg --status-fd 30 --configure libpipeline1:amd64 wget:amd64
`---

So, what's happening here is this. apt tells dpkg to unpack those two
packages, libpipeline1 is a depenendcy of man-db, and wget contains a
man page which will activate the man-db trigger.

Because during wget unpack the man-db dependencies are not satisfied
anymore, as libpipeline1 is also unpacked, its trigger cannot be
processed (starting with dpkg 1.17.17), so they get deferred for later.

Then, on the second dpkg invocation, apt tells dpkg exactly what it
wants configured, and that does not include man-db, so dpkg does not
process that one, because it's not required to configure them.


So apt needs to either pass man-db to the --configure call, or just
do a final --triggers-only/--configure --pending call. A trivial fix
would be to change the default value for DPkg::TriggersPending to
true.

,---
apt-get -o DPkg::TriggersPending=true install --reinstall libpipeline1 wget
[…]
(Reading database ... 232896 files and directories currently installed.)
Preparing to unpack .../libpipeline1_1.4.0-1_amd64.deb ...
Unpacking libpipeline1:amd64 (1.4.0-1) over (1.4.0-1) ...
Preparing to unpack .../archives/wget_1.16-1_amd64.deb ...
Unpacking wget (1.16-1) over (1.16-1) ...
Processing triggers for install-info (5.2.0.dfsg.1-5) ...
Setting up libpipeline1:amd64 (1.4.0-1) ...
Setting up wget (1.16-1) ...
Processing triggers for libc-bin (2.19-12) ...
Processing triggers for man-db (2.7.0.2-2) ...
`---

This should be pretty safe as a default, because a --pending call when
there's nothing pending is always successful.

Thanks,
Guillem


Reply to: