[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: merged /usr vs. symlink farms



Hi,

On 23.08.21 17:23, Russ Allbery wrote:

[one package with /bin/foo, another with /usr/bin/foo]

This seems clearly nonsensical to me even if usrmerge was never on the
horizon, since which binary you got would randomly depend on the PATH
ordering and the order of /bin vs. /usr/bin in user-set PATHs is not fixed
and has never mattered.

It is less nonsensical because usrmerge exists, since we presumably don't want to keep the /bin paths in the packages, so at some point we need to move /bin/foo to /usr/bin/foo inside a package. That is safe with current dpkg, as dpkg will not delete /bin/foo if it has the same inode as a just-unpacked file.

We have another kind of common transition: moving files between packages with a Replaces: relation.

If a package undergoes both transitions in the same release cycle, then dpkg would indeed see package A containing /bin/foo, and package B with Replaces: A containing /usr/bin/foo.

And in this case, /bin/foo can be removed after /usr/bin/foo is unpacked, and then the file vanishes because dpkg did not register the ownership transfer.

   Simon


Reply to: