Re: Sharing a script between two "Multi-Arch: foreign" packages
Hi Wookey and Sven,
thanks for your answers! They helped to stop looking for a non-existing
solution, but find a (nearly) clean one:
(ab)use libwine (M-A:same) for the wineserver wrapper script.
On 06.08.19 17:03, Wookey wrote:
> On 2019-08-06 16:45 +0200, Jens Reyer wrote:
>> Hi all,
>> is there a way for two different, arch-specific packages (from the same
>> source package) to share an identical file (script)?
> Only if those two arch-specific packages have the same name -
> i.e. they are the 'same' package from dpkg's point of view, just
> arch-specific variants of it.
>> This works for "Multi-Arch: same" packages:
>> $ dpkg -S /usr/share/doc/libwine/changelog.Debian.gz
>> libwine:i386, libwine:amd64: /usr/share/doc/libwine/changelog.Debian.gz
>> $ dpkg -S /usr/lib/wine/wineserver
>> wine32:i386, wine64:amd64: /usr/lib/wine/wineserver
> If I understand correctly you want 'wine32' and 'wine64' (different
> packages) to share a file.
> dpkg has special magic to notice that files in multiarch:same packages
> which are in fact identical may be installed over each other without
> complaining about clashes, and mark tham as being owned by all the
> install arch variants, and not remove them until the last version of
> the package is removed.
> Otherwise a file is always owned by exactly one package.
> So if you could arrange to just have a 'wine' binary that was 32 or 64
> as required then you could make this work as you want. Otherwise you
> need both those packages to depend on another wine-startup or whatever
> that contains the shared file.
Instead of adding this new package "wineserver", I'm (ab)using libwine
now (which is "M-A: same" and depended on by wine32 and wine64 which
have the binary).
The only drawback is that libwine now ships a wrapper script for
binaries, which are in packages that libwine doesn't depend on. I don't
expect this to be an issue in practice, but still added a clear error
message for that case.
> (I think - I admit I haven't fully groked the wine package layout)
Yeah, we're special ;)
I'd be happy to explain this in more depth, just tell me.
Greets and thanks again