Re: [pkg-nvidia-devel] Moving diversions between packages
Goswin von Brederlow writes ("Re: [pkg-nvidia-devel] Moving diversions between packages"):
> Russ Allbery <firstname.lastname@example.org> writes:
> > Ian Jackson <email@example.com> writes:
> > > Why not have the new package ship libGL.so.1 to a more specific filename
> > > and create a symlink named libGL.so.1 by hand in its postinst ? That
> > > way you can defer doing the diversion until that part of the postinst,
> > > by which time the old package and its diversion are gone.
> > Oh, huh, I hadn't thought of that. But wouldn't this cause the library to
> > temporarily disappear, which would be contrary to the last paragraph of
> > Policy 8.1? Am I being too conservative about that?
Maybe. The point of policy 8.1 is so that the package can be upgraded
without rendering all of the things which depend on it unable to
start. If you do as I suggest you'll undo the diversion and link in
the prerm, and thus every time the package is upgraded it will revert
back to the previous version and (presumably) all the things which are
linked against it will stop working.
Does that matter ?
> For the split second between the dpkg-divert and the ln call on install
> or between the rm and dpkg-divert on removal. I think you are too
> conservative there.
No, I don't think that's quite right, for the reasons I give above.
> You are refering to "between the time that dpkg installs it and the time
> that ldconfig is run in the postinst script", right? But the disapearing
> would be only for a split second while your postinst runs.
It would be better not to have it broken even for a split second -
after all, something might go wrong and interrupt the process at that
point. But I think in my suggestion it will be broken for much
Perhaps it would be possible to somehow design an arrangement where
the first time you install the new library package it waits until the
postinst to do its diversion, but otherwise it leaves it be and
doesn't mess with the links.