1 |
Author: darkside |
2 |
Date: 2009-04-08 05:34:37 +0000 (Wed, 08 Apr 2009) |
3 |
New Revision: 398 |
4 |
|
5 |
Modified: |
6 |
trunk/modules/profile.eselect |
7 |
Log: |
8 |
Make 'eselect profile show' show the relative path. Patch by Thomas Bellman in bug 248487 |
9 |
|
10 |
Modified: trunk/modules/profile.eselect |
11 |
=================================================================== |
12 |
--- trunk/modules/profile.eselect 2009-04-08 04:58:14 UTC (rev 397) |
13 |
+++ trunk/modules/profile.eselect 2009-04-08 05:34:37 UTC (rev 398) |
14 |
@@ -83,9 +83,10 @@ |
15 |
do_show() { |
16 |
write_list_start "Current make.profile symlink:" |
17 |
if [[ -L "${ROOT}/etc/make.profile" ]] ; then |
18 |
- local link=$(canonicalise ${ROOT}/etc/make.profile) |
19 |
+ local link=$(canonicalise "${ROOT}/etc/make.profile") |
20 |
local portdir=$(portageq portdir) |
21 |
- link=${link##..${ROOT}/${portdir}/profiles/} |
22 |
+ local profiledir=$(canonicalise "${ROOT}/${portdir}/profiles") |
23 |
+ link=${link##${profiledir}/} |
24 |
write_kv_list_entry "${link}" "" |
25 |
else |
26 |
write_kv_list_entry "(unset)" "" |
27 |
@@ -99,13 +100,15 @@ |
28 |
} |
29 |
|
30 |
do_list() { |
31 |
- local active targets |
32 |
+ local portdir profiledir active targets |
33 |
targets=( $(find_targets) ) |
34 |
|
35 |
[[ -z "${targets}" ]] && die -q "Failed to get a list of valid profiles" |
36 |
|
37 |
- active=$(canonicalise ${ROOT}/etc/make.profile) |
38 |
- active=${active##*profiles/} |
39 |
+ portdir=$(portageq portdir) |
40 |
+ profiledir=$(canonicalise "${ROOT}/${portdir}/profiles") |
41 |
+ active=$(canonicalise "${ROOT}/etc/make.profile") |
42 |
+ active=${active##${profiledir}/} |
43 |
if [[ -n ${targets[@]} ]] ; then |
44 |
local i |
45 |
for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do |