I have a simple profiles.desc in my local overlay: amd64 amd64 stable amd64 amd64/plasma stable amd64 legacy/amd64 stable amd64 legacy/amd64/plasma stable With eselect profile I cannot select the first two profiles by name: # eselect profile set amd64/plasma !!! Error: amd64/plasma is not a valid profile for amd64 exiting I found the reason in the function set_symlink: # do a reverse lookup and find the arch associated with ${target} parch=$(sed -n -e \ "s|^\([[:alnum:]_-]\+\)[[:space:]].*${target}[[:space:]].*$|\1|p" \ "${repopath}/profiles/profiles.desc") The dot after the first [[:space::]] should be removed to only allow spaces between the architecture and the profile name. Currently sed returns two lines when trying to select amd64/plasma which fails. Reproducible: Always
Created attachment 468426 [details, diff] patch for profile.eselect Attached patch fix should fix the problem. Please test. > The dot after the first [[:space::]] should be removed to only allow > spaces between the architecture and the profile name. Slightly different solution, [[:space:]]\+ now requires one or more whitespace characters (whereas [[:space:]]* would require zero or more which I think would not be right).
Your are right and your patch works as expected. Sorry for the late response, I somehow overlooked that you wrote something above the citation. Thought the fix was simple enough to be directly commited.
Fixed in git: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=3cb21a09eff8693ddd7eb8de3b7903ab623a6c53
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52962d756a157e0ddf24394160b6ea73dd63d3ac commit 52962d756a157e0ddf24394160b6ea73dd63d3ac Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2017-12-25 11:05:58 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2017-12-25 11:10:28 +0000 app-admin/eselect: Version bump. Closes: https://bugs.gentoo.org/614008 Closes: https://bugs.gentoo.org/617572 Closes: https://bugs.gentoo.org/640386 Package-Manager: Portage-2.3.19, Repoman-2.3.6 app-admin/eselect/Manifest | 1 + app-admin/eselect/eselect-1.4.10.ebuild | 61 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+)