On Fri, 16 Apr 2010, Guillem Jover wrote:
> 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)

It's not clear to me that this is reliable:
it some cases we would get <package>.<control> (when installed in
/var/lib/dpkg/info/) and other case <control> (when called from
tmp.ci).

It seems also wrong for maintainer scripts to rely on this which exposes
rather internal information. Suppose a script assumes one of both formats
above, it might break when we get <arch>:<package>.<control> just because
we decided to store the files that way for multi-arch (I know we're more
likely to use different directories, but still...).

> n 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.

If you consider that the maintainer must be the only one to have full
control on what the script does, yes. But it can make sense for the
maintainer to delegate that control by putting some functions which are
more like specialized hooks.

That's the approach I followed for the conffile handling stuff, it gives
more freedom to change the internal implementation and make it do more
without requiring intervention from the maintainer who added that hook
in its maintainer scripts.

Cheers,
-- 
Raphaƫl Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to