Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830707 - app-admin/eselect-1.4.18: realpath: '': No such file or directory
Summary: app-admin/eselect-1.4.18: realpath: '': No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2022-01-06 19:42 UTC by Georgy Yakovlev
Modified: 2022-01-08 17:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix canonicalise call in set_symlink() (profile.eselect.patch,593 bytes, patch)
2022-01-07 06:56 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2022-01-06 19:42:46 UTC
Since updating to new eselect version, eslecting profile prints this:

# eselect profile set 17
realpath: '': No such file or directory
Comment 1 Mike Gilbert gentoo-dev 2022-01-06 20:41:19 UTC
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.
Comment 2 Ulrich Müller gentoo-dev 2022-01-07 06:55:05 UTC
(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.
Comment 3 Ulrich Müller gentoo-dev 2022-01-07 06:56:09 UTC
Created attachment 761464 [details, diff]
Fix canonicalise call in set_symlink()

Please try if attached patch fixes it.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2022-01-07 07:49:18 UTC
quickly tested the patch, no more warnings for me.
Comment 5 Larry the Git Cow gentoo-dev 2022-01-07 14:11:35 UTC
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(-)
Comment 6 Larry the Git Cow gentoo-dev 2022-01-08 17:16:28 UTC
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(+)