aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2009-04-08 05:34:37 +0000
committerJeremy Olexa <darkside@gentoo.org>2009-04-08 05:34:37 +0000
commit6eca992f583e12390d10f226cce0c3446efc02da (patch)
tree4c3da1b485e503abd7e1b9c962ec77396043881b /modules/profile.eselect
parentAllow parent profiles to be selectable, patch by Thomas Bellman in bug 248470 (diff)
downloadeselect-6eca992f583e12390d10f226cce0c3446efc02da.tar.gz
eselect-6eca992f583e12390d10f226cce0c3446efc02da.tar.bz2
eselect-6eca992f583e12390d10f226cce0c3446efc02da.zip
Make 'eselect profile show' show the relative path. Patch by Thomas Bellman in bug 248487
svn path=/trunk/; revision=398
Diffstat (limited to 'modules/profile.eselect')
-rw-r--r--modules/profile.eselect13
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/profile.eselect b/modules/profile.eselect
index 7100f0e..5b06615 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -83,9 +83,10 @@ describe_show() {
do_show() {
write_list_start "Current make.profile symlink:"
if [[ -L "${ROOT}/etc/make.profile" ]] ; then
- local link=$(canonicalise ${ROOT}/etc/make.profile)
+ local link=$(canonicalise "${ROOT}/etc/make.profile")
local portdir=$(portageq portdir)
- link=${link##..${ROOT}/${portdir}/profiles/}
+ local profiledir=$(canonicalise "${ROOT}/${portdir}/profiles")
+ link=${link##${profiledir}/}
write_kv_list_entry "${link}" ""
else
write_kv_list_entry "(unset)" ""
@@ -99,13 +100,15 @@ describe_list() {
}
do_list() {
- local active targets
+ local portdir profiledir active targets
targets=( $(find_targets) )
[[ -z "${targets}" ]] && die -q "Failed to get a list of valid profiles"
- active=$(canonicalise ${ROOT}/etc/make.profile)
- active=${active##*profiles/}
+ portdir=$(portageq portdir)
+ profiledir=$(canonicalise "${ROOT}/${portdir}/profiles")
+ active=$(canonicalise "${ROOT}/etc/make.profile")
+ active=${active##${profiledir}/}
if [[ -n ${targets[@]} ]] ; then
local i
for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do