Re: Bug#560317: dpkg-trigger complains at dpkg-reconfigure time
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.
You also need to set DPKG_MAINTSCRIPT_NAME to "postinst" as this one
is used by dpkg-maintscript-helper.
Given that dpkg-maintscript-helper is also impacted and not only
dpkg-trigger, I think that — yes — it really make sense to set them.
It would even be nice to have a fixed version sooner rather than later.
I just merged 596369 into this one (where cron is affected due to its
usage of dpkg-maintscript-helper).
Raphaël Hertzog ◈ Debian Developer ◈ [Flattr=20693]
Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)