Re: dpkg divert in preinst scripts
Neil Williams wrote:
> Having the divert in the preinst is *always* racy - the only reason it
> doesn't show in typical Debian is because the packages doing the
> diverting are not part of the base install.
Diversions in base packages (except cases like /bin/sh that can use
postinst, maybe) is undesirable, yes.
This talk of always racy I don’t understand. Maybe you are saying
that to make it possible to cross-install (for example when
bootstrapping) it must always be possible to safely unpack without
running preinst? But that is all that preinst is for --- doing
whatever is necessary to be able to safely unpack.
It might be good for a future policy to specify that Priority:
required packages must cope without preinst being run at all for
the initial unpack.
Haven’t thought it through completely, but it at least sounds good in
> Have to check lintian but I
> see no reason why lintian could not work just as well with Depends:
> binutils | binutils-multiarch.
> The only fly in the ointment is 'as' which would need to be in a
> separate package as it cannot be easily multiarched.
Another obstacle: many packages have Build-Depends: binutils (>= some
version). Otherwise I’d be glad to write a patch to binutils-multiarch
> $ file /var/lib/dpkg/info/bash.preinst
> /var/lib/dpkg/info/bash.preinst: ELF 64-bit LSB executable, x86-64,
> version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
> 2.6.18, stripped
dash too, soon. http://bugs.debian.org/546528
>>> New binutils equiv package just for /usr/bin/as
>> What does this mean?
[what it means]
Thanks for the explanation.