Re: [pkg-nvidia-devel] Moving diversions between packages
Goswin von Brederlow <email@example.com> writes:
> Russ Allbery <firstname.lastname@example.org> writes:
>> Goswin von Brederlow <email@example.com> writes:
>>> But you are right, if your suggestion is to undo this in prerm then
>>> there will be a long delay between undoing and redoing. But if you
>>> fully undo things then programs will still start, they just won't be
>>> able to use hardware accelerated GL and fallback to software GL.
>> No, that's not correct. libGL.so.1 would disappear, which means that
>> any programs linked with that shared library would not be able to start
>> at all.
> *fully* undo. That means you delete the link, undo the diversion and
> move the original libGL.so.1 back into place. So it would be there. But
> as said there is no need to undo the diversion for an upgrade.
Oh, I see what you're saying. Right. And if the user is removing the
NVIDIA libGL libraries, having hardware-accelerated GL for NVIDIA cards go
away is probably their intended action.
> - nvidias prerm runs
> - nvidias libGL.so.1 is removed by dpkg
> - libGL.so.1 is now a dangling symlink
> - dpkg still runs and does some bookkeeping and syncing
> - nvidias postrm runs
> If you remove the diversion in postrm then there is a window where the
> link is dangling. The same window existing packages with diversions in
> preinst/postrm do have. Removing the diversion in prerm avoids that
> window but that only works with your link.
> If you remove the diversion in postrm there probably won't be any
> complaints but you could do it perfect in prerm.
Ah, yes, good point.
The NVIDIA package already installs its libGL under a different name than
libGL.so.1.2 and handles the libGL.so symlink separately (via a trigger),
so the only file affected by this is libGL.so.1. I like this idea of
moving the handling of it to postinst, and I think all the other
diversions for the libgl1-nvidia package can also be moved to postinst.
Andreas, do you see anything about this that I'm missing that would cause
Russ Allbery (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>