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

Raphael Hertzog hertzog at debian.org
Fri Dec 11 07:31:26 UTC 2009


On Thu, 10 Dec 2009, Joey Hess wrote:
> Raphael Hertzog wrote:
> > Because the postinst is called by dpkg-reconfigure (of debconf) and it
> > doesn't set the same environment variables that dpkg does set when
> > it calls the postinst by itself. In particular DPKG_MAINTSCRIPT_PACKAGE
> > is missing.
> > 
> > (dpkg does also set DPKG_MAINTSCRIPT_ARCH and DPKG_RUNNING_VERSION)
> > 
> > It's a bug in dpkg-reconfigure, please file it or reassign.
> 
> 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.

Right.

> Perhaps dpkg-reconfigure needs to call dpkg --configure --pending ?

Indeed, it's probably a good idea. Or maybe: "dpkg --triggers-only
--pending" (but reading the doc I'm not sure if --configure is not
better).

Guillem, does --triggers-only bring the package back to configured
if they were in that state before the trigger registration ?

Cheers,
-- 
Raphaël Hertzog





More information about the Debconf-devel mailing list