1 |
darkside 09/04/08 05:36:35 |
2 |
|
3 |
Added: eselect-1.0.11-relative-profiles.patch |
4 |
Log: |
5 |
Make 'eselect profile show' show the relative path. Patch by Thomas Bellman in bug 248487 |
6 |
(Portage version: 2.1.6.11/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-admin/eselect/files/eselect-1.0.11-relative-profiles.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect/files/eselect-1.0.11-relative-profiles.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect/files/eselect-1.0.11-relative-profiles.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: eselect-1.0.11-relative-profiles.patch |
15 |
=================================================================== |
16 |
Allow relative paths to be shown instead of abs paths for eselect profile show, |
17 |
|
18 |
patch by Thomas Bellman in bug 248487 |
19 |
|
20 |
Already in svn. |
21 |
|
22 |
--- modules/profile.eselect (revision 397) |
23 |
+++ modules/profile.eselect (working copy) |
24 |
@@ -83,9 +83,10 @@ |
25 |
do_show() { |
26 |
write_list_start "Current make.profile symlink:" |
27 |
if [[ -L "${ROOT}/etc/make.profile" ]] ; then |
28 |
- local link=$(canonicalise ${ROOT}/etc/make.profile) |
29 |
+ local link=$(canonicalise "${ROOT}/etc/make.profile") |
30 |
local portdir=$(portageq portdir) |
31 |
- link=${link##..${ROOT}/${portdir}/profiles/} |
32 |
+ local profiledir=$(canonicalise "${ROOT}/${portdir}/profiles") |
33 |
+ link=${link##${profiledir}/} |
34 |
write_kv_list_entry "${link}" "" |
35 |
else |
36 |
write_kv_list_entry "(unset)" "" |
37 |
@@ -99,13 +100,15 @@ |
38 |
} |
39 |
|
40 |
do_list() { |
41 |
- local active targets |
42 |
+ local portdir profiledir active targets |
43 |
targets=( $(find_targets) ) |
44 |
|
45 |
[[ -z "${targets}" ]] && die -q "Failed to get a list of valid profiles" |
46 |
|
47 |
- active=$(canonicalise ${ROOT}/etc/make.profile) |
48 |
- active=${active##*profiles/} |
49 |
+ portdir=$(portageq portdir) |
50 |
+ profiledir=$(canonicalise "${ROOT}/${portdir}/profiles") |
51 |
+ active=$(canonicalise "${ROOT}/etc/make.profile") |
52 |
+ active=${active##${profiledir}/} |
53 |
if [[ -n ${targets[@]} ]] ; then |
54 |
local i |
55 |
for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do |