On Wed, 2022-09-28 at 13:39 -0400, Zack Weinberg wrote: > convert-usrmerge is nominally idempotent and restartable, but (as it > says in the script’s own documentation) if “the system crashes at a > really bad time” during the conversion process it might not be > possible to recover without manual intervention. Unfortunately, it’s > worse than that: if the system crashes at _just_ the wrong time > (specifically, in the middle of a convert_directory operation, in > between the rename() and symlink() calls) it appears to be possible > for the next boot to find the root filesystem in a state where /lib > or /bin doesn’t exist at all. Recovery from this state will require > booting from installation media.
There are many packages that will render a package unbootable if the system crashes at just the wrong time... You need a very, very large change to how Debian works to change that. > To fix this, I think some technique for replacing directories with > symlinks _atomically_ needs to be found. No, you would need to atomically replace the *entire* system, not just individual directories. But please explain how this is specifc to usrmerge and not many other packages. Ansgar