Created attachment 301609 [details, diff] Patch for profile.eselect Reported by Sergei Trofimovich <slyfox@gentoo.org>: Before patching: $ ./_inst/bin/eselect profile list !!! Error: Cannot get list of repositories !!! Error: Failed to get a list of valid profiles exiting After patching: $ ./_inst/bin/eselect profile list !!! Warning: Both /etc/make.profile and /etc/portage/make.profile exist. !!! Warning: Using /etc/make.profile for now. Available profile symlink targets: [1] default/linux/amd64/10.0 * [2] default/linux/amd64/10.0/selinux [3] default/linux/amd64/10.0/desktop ... List of my repository names: gentoo gentoo-haskell local-cross-overlay slyfox-gentoo The last one 'slyfox-gentoo' matched against '\bgentoo\b' ('-' is a nonword character) and broke horribly.
Thanks for pointing this out. There's a small problem with your patch: ^ and $ don't match beginning and end of line, but beginning and end of pattern. Therefore the second substitution won't have any effect at all. However, this can be cured by adding the "m" flag to the substitution. Can you try if the following change fixes the problem for you: - | sed "s/[[:space:]]\+/\n/g;s/\b${DEFAULT_REPO}\b/ &/" \ + | sed "s/[[:space:]]\+/\n/g;s/^${DEFAULT_REPO}\$/ &/gm" \
(In reply to comment #1) > Thanks for pointing this out. There's a small problem with your patch: ^ and $ > don't match beginning and end of line, but beginning and end of pattern. > Therefore the second substitution won't have any effect at all. > > However, this can be cured by adding the "m" flag to the substitution. Can you > try if the following change fixes the problem for you: > > - | sed "s/[[:space:]]\+/\n/g;s/\b${DEFAULT_REPO}\b/ &/" \ > + | sed "s/[[:space:]]\+/\n/g;s/^${DEFAULT_REPO}\$/ &/gm" \ Oh, my sed is very weak. Looks like I was very lucky having 'gentoo' alphasorted properly. Your change works for me as well. Thanks!
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/eselect?view=revision&revision=865> +2012-02-12 Ulrich Müller <ulm@gentoo.org> + + * modules/profile.eselect (get_repos): Fix regular expression + for overlays, bug 403215. Thanks to Sergei Trofimovich + <slyfox@gentoo.org>. +
This is fixed in eselect-1.3.1.