On Mon, 2009-09-14 at 22:34:16 +0200, Sven Joachim wrote:
> On 2009-09-14 10:38 +0200, Raphael Hertzog wrote:
> > Package: dpkg
> > Version: 1.15.4
> > Severity: wishlist
> >
> > Please export DPKG_MAINTSCRIPT_NAME in the environment of maintainer
> > scripts, it should contain the name of the maintainer script (prerm,
> > postrm, preinst, postinst, config) that is currently running.

config would not always have it, as dpkg does have any knowledge of
it, and in some cases it would be postinst.

The difference with this variable and the currently exported ones, is
that this one is always passed to the script through argv[0]:

  self=$(basename $0)

and this expression is a constant across all maintainer scripts, in
comparison with the package name which would need to be hardcoded
on each maintainer script, or the architecture which is known only at
built time and would need modifying it then.

I'm not outright opposed to this, though, it just feels wrong somehow
for external programs to change behaviour depending on what maintainer
script called them.

> > See #546165 for an example of where it would have been useful.
> 
> Another example is the deprecation warning for dpkg's own
> "--print-installation-architecture" option.  This evening I saw that
> warning several times when I finally upgraded my laptop to X.Org 7.4.

Right, the problem though, is that if the warning gets removed then no
one sees it, and it cannot be fixed in later versions, which kind of
defeats the purpose of the warning.

> Would be nice if this could be suppressed in prerm scripts as well.

Well, I'd rather see the warnings one last time on upgrade, than have
to make dpkg aware of that variable to modify its behaviour when
printing the warning, the same goes for install-info, as people might
forget to remove all insances and they will not warn anymore.

regards,
guillem



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to