Since updating to new eselect version, eslecting profile prints this: # eselect profile set 17 realpath: '': No such file or directory
canonicalise calls either "readlink -f" or "realpath". realpath outputs an error message on an empty argument, whereas readlink -f just exits with status 1 and no message. set_symlink in profile.eselect calls 'canonicalise "${EROOT}"', and EROOT might be empty. The profile still gets updated, despite the error message. Maybe canonicalise should be a no-op when the first argument is empty.
(In reply to Mike Gilbert from comment #1) > canonicalise calls either "readlink -f" or "realpath". > > realpath outputs an error message on an empty argument, whereas readlink -f > just exits with status 1 and no message. > > set_symlink in profile.eselect calls 'canonicalise "${EROOT}"', and EROOT > might be empty. The profile still gets updated, despite the error message. Thank you for this excellent analysis. > Maybe canonicalise should be a no-op when the first argument is empty. No, it's a problem in the caller.
Created attachment 761464 [details, diff] Fix canonicalise call in set_symlink() Please try if attached patch fixes it.
quickly tested the patch, no more warnings for me.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/eselect.git/commit/?id=de93ee70c59ad7207210f12b8238d87072054671 commit de93ee70c59ad7207210f12b8238d87072054671 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-01-07 14:10:20 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-01-07 14:10:20 +0000 Fix canonicalise call in profile module * modules/profile.eselect (set_symlink): Don't call canonicalise with an empty argument, bug 830707. Bug: https://bugs.gentoo.org/830707 Signed-off-by: Ulrich Müller <ulm@gentoo.org> ChangeLog | 5 +++++ modules/profile.eselect | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=859c011529ca64ac824ade08235208a1b5738e37 commit 859c011529ca64ac824ade08235208a1b5738e37 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-01-08 17:14:41 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-01-08 17:16:23 +0000 app-admin/eselect: Version bump to 1.4.19 Closes: https://bugs.gentoo.org/830707 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-admin/eselect/Manifest | 1 + app-admin/eselect/eselect-1.4.19.ebuild | 58 +++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+)