[Debconf-devel] Bug#560317: dpkg-trigger complains at dpkg-reconfigure time

Ian Jackson ijackson at chiark.greenend.org.uk
Mon Sep 13 10:05:06 UTC 2010


Raphael Hertzog writes ("Re: Bug#560317: dpkg-trigger complains at dpkg-reconfigure time"):
> On Thu, 10 Dec 2009, Joey Hess wrote:
> > Does it actually make sense for dpkg-trigger to see those environment
> > variables when the postinst is not being run by dpkg? Seems possible that
> > any deferred trigger processing it then sets up will not take effect until
> > the next dpkg run, which could be well after dpkg-reconfigure finishes.

I think Joey is right.  In particular, dpkg-reconfigure should not set
DPKG_RUNNING_VERSION, because that promises that the whole thing is
running as a descendant a copy of dpkg; said copy of dpkg is
responsible for processing triggers.

If these variables are all set, "dpkg-trigger --check-supported" will
say "yes" and an "update-foobar" script called by the postinst is
entitled to simply activate a trigger, rather than doing real work.

The effect could be that although it is necessary to rerun the work
done by update-foobar, it won't happen (until the next time dpkg runs
for some other reason, for added confusion).

> Given that dpkg-maintscript-helper is also impacted and not only
> dpkg-trigger, I think that ? yes ? it really make sense to set them.

Can you explain why the analysis above is wrong ?

Ian.





More information about the Debconf-devel mailing list