
On 2021/03/16 11:40, Andrei Borzenkov wrote:
On 16.03.2021 20:26, L A Walsh wrote:
mv: inter-device move failed: 'var/lib/rpm/alternatives' to 'usr/lib/sysimage/rpm/alternatives'; unable to remove target: Directory not empty; rmdir: failed to remove 'var/lib/rpm': Directory not empty
And what exactly is not clear in this message? Mon Nov 20 14:50:53 UTC 2017 - mpluskal@suse.com - Move update alternatives database to new location
---- I was semi-expecting the rpm-db to move at some point, but how that got turned into a failed move of 'alternatives' wasn't exactly clear to me. Also, How can a 'mv' fail when it is moving to another device? If you are moving a dir to a target that already exists, then you either 1) mv the target out of the way, or 2) automatically merge them. if, perchance you wanted to be very cautious, then rename target files that have the same name. But directories w/the same name would just have their contents merged. Usually that has the desired effect. ======================== On 2021/03/16 12:53, Carlos E. R. wrote:
One of the moves (across mounts) failed because target directory was not empty.
---- Um. How would it not being across a mount make it different? Still -- it's related to *nix poorly handling "cp -a x/y/zdir a/b/zdir". You don't get a deterministic result and may just see an install script fail instead of getting it right. More often than not, the better option is to merge them -- certainly offering to do so is "more better", 🤔, (one area where Windows gets it right).