Helmut Grohne: > Hi Johannes, > > On Fri, Jun 09, 2023 at 05:47:56PM +0200, Johannes Schauer Marin Rodrigues wrote: >> if I understand that plan correctly, the usrmerge-support package >> setting up diversions is only necessary because you want to avoid >> having to do the move to /usr of *all* affected packages in the >> essential set in a single dinstall? Is that correct? > > This is not correct. In bookworm -> trixie upgrade scenario, we intend > to move all the files from / to /usr. Now we look into how this > happens focus on one particular symlink, without loss of generality > choose /bin. Since /bin is no longer in the dpkg database at the end > of the upgrade, some package must be the last one to contain /bin. > When upgrading (or removing that package), dpkg will attempt to remove > /bin (which in its opinion is an empty directory and the last consumer > is releasing it). However, since dpkg has no clue about file types, it > doesn't actually know that this is a directory and takes care of the > /bin -> /usr/bin symlink using unlink(). And this is where /bin > vanishes. Oops. > > So the idea here is to add a protective diversion for /bin such that > removing /bin instead removes some path we don't care about. [...] Did you consider just having one package keep one dummy file in /bin? While this isn't elegant it sounds much less complex than diversions and tricky pre-depend loops, etc. I might be very well missing something here (for example maybe it's really essential that no files remain in /bin, even not a dummy file). But in the other branch of this thread you welcomed "dumb" questions, so here you go ;]
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature