diff options
author | Michael Marineau <mike@marineau.org> | 2013-06-18 20:57:21 -0400 |
---|---|---|
committer | Paul Varner <fuzzyray@gentoo.org> | 2013-07-08 14:12:01 -0500 |
commit | 2e5a3b4c423eaefbbc8d1ad2fff55168c22cb48d (patch) | |
tree | a11245f456a87d7190babfed62b5f712fe1132db /bin | |
parent | Rename eclean --destructive option to --deep (Bug #475808) (diff) | |
download | gentoolkit-2e5a3b4c423eaefbbc8d1ad2fff55168c22cb48d.tar.gz gentoolkit-2e5a3b4c423eaefbbc8d1ad2fff55168c22cb48d.tar.bz2 gentoolkit-2e5a3b4c423eaefbbc8d1ad2fff55168c22cb48d.zip |
euse: fix looking up portage-2 style parent paths with empty repo name
When a parent is defined as ":path/to/profile" the blank name before the
colon means the current repo, not the "gentoo" repo.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/euse | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -448,7 +448,7 @@ get_all_make_conf() { # component by traversing through the cascading profile # # Bug #414961 allows ':' shorthand to resolve to the ${PORTDIR}/profiles -# A value before the ':' references the repository, no value means gentoo +# A value before the ':' references the repository, no value means same repo # # Example: local:base would refer to the profiles directory in the repository # path owned by the 'local' repository @@ -475,12 +475,15 @@ traverse_profile() { # We have a path with a colon shortcut let i=$index-1 repo="${parent:0:${i}}" - [[ -z "${repo}" ]] && repo="gentoo" parent="${parent:$index}" limit=${#PORTAGE_REPOS[@]} for ((i=0; i < limit ; i++)); do - if [[ ${repo} == ${PORTAGE_REPOS[i]} ]]; then - parent="${PORTAGE_REPO_PATHS[i]}/profiles/${parent}" + repo_profiles="${PORTAGE_REPO_PATHS[i]}/profiles" + if [[ "${repo}" == ${PORTAGE_REPOS[i]} ]] || \ + ( [[ -z "${repo}" ]] && + [[ "${curdir}" == ${repo_profiles}/* ]] ) + then + parent="${repo_profiles}/${parent}" break fi done |