Control: tags -1 + moreinfo On Thu, Aug 15, 2024 at 07:42:27AM +0200, Peter Boross wrote: > I have tried to upgrade of package to newest version but I have error message: > "The base-files package cannot be installed because /bin is a symbolic link > and not pointing to usr/bin exactly. This is an unexpected situation. Cannot > proceed with the upograde." > I have checked the preintst script and found the problem. The checking of > existing /bin symlink with the readlink command results the correct /usr/bin > path but in the preinst script the comparison is made to "usr/bin" instead, > therefore compariosn result is false and I receive the above quoted error > message. > The preinst script should have been corrected in line 9 to make comparison > between result of readlink and "/usr/$d" instead of "usr/$d".
Thanks for the detailed description of your situation. You observe that your link target actually is "/usr/bin" whereas the preinst script expects "usr/bin" and fails. Let us assume that the script would not return an error in this case. One of the next steps would be dpkg unpacking the data.tar of base-files. As it is doing so, it would very likely notice that /bin is installed by multiple packages (some of which still install it as a directory). However, dpkg has no tracking of file types. Therefore it would assume that the existing /bin is what other packages put there. As your actual /bin is pointing to /usr/bin, but the data.tar to be unpacked wants to point it at usr/bin and these do not match exactly, unpack of data.tar would abort with an error. This error would merely tell you that /bin is involved in the conflict, but nothing about the target. In order to improve this experience, the preinst check was added. Therefore my conclusion is that the preinst check is correct in asserting that your /bin symlink is not looking as expected. It would still be debatable whether preinst should automatically replace a /bin -> /usr/bin symbolic link with a /bin -> usr/bin symbolic link as these should be functionally equivalent. However, we'd need a better understanding of what tool would create such links as neither debootstrap nor usrmerge create them as absolute. As such, I do not yet see an actionable problem in the base-files package. Helmut