1 |
commit: 5ac6dea03a20b7d9f470d69f9652b0568f649ac5 |
2 |
Author: Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Sep 6 18:04:48 2011 +0000 |
4 |
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 6 18:04:48 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5ac6dea0 |
7 |
|
8 |
prefix fix and number update |
9 |
|
10 |
--- |
11 |
app-admin/eselect/ChangeLog | 4 + |
12 |
app-admin/eselect/files/eselect-alternatives.patch | 65 ++++++++++++------- |
13 |
2 files changed, 45 insertions(+), 24 deletions(-) |
14 |
|
15 |
diff --git a/app-admin/eselect/ChangeLog b/app-admin/eselect/ChangeLog |
16 |
index c48d200..5c16c2f 100644 |
17 |
--- a/app-admin/eselect/ChangeLog |
18 |
+++ b/app-admin/eselect/ChangeLog |
19 |
@@ -2,6 +2,10 @@ |
20 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
21 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect/ChangeLog,v 1.179 2011/01/22 21:38:52 ulm Exp $ |
22 |
|
23 |
+ 06 Sep 2011; Sébastien Fabbro <bicatali@g.o> |
24 |
+ files/eselect-alternatives.patch: |
25 |
+ Updated to newer eclectic alternatives. Fixed a prefix thanks Francois Bissey |
26 |
+ |
27 |
*eselect-1.2.17-r1 (06 Sep 2011) |
28 |
|
29 |
06 Sep 2011; Sébastien Fabbro <bicatali@g.o> |
30 |
|
31 |
diff --git a/app-admin/eselect/files/eselect-alternatives.patch b/app-admin/eselect/files/eselect-alternatives.patch |
32 |
index 9914980..a21632b 100644 |
33 |
--- a/app-admin/eselect/files/eselect-alternatives.patch |
34 |
+++ b/app-admin/eselect/files/eselect-alternatives.patch |
35 |
@@ -1,6 +1,6 @@ |
36 |
Index: libs/Makefile.am |
37 |
=================================================================== |
38 |
---- libs/Makefile.am (revision 803) |
39 |
+--- libs/Makefile.am (revision 837) |
40 |
+++ libs/Makefile.am (working copy) |
41 |
@@ -1,6 +1,7 @@ |
42 |
eselectlibsdir = $(datadir)/$(PACKAGE_NAME)/libs/ |
43 |
@@ -30,7 +30,7 @@ Index: libs/Makefile.am |
44 |
@$(dosed) $< > $@ |
45 |
Index: bin/Makefile.am |
46 |
=================================================================== |
47 |
---- bin/Makefile.am (revision 803) |
48 |
+--- bin/Makefile.am (revision 837) |
49 |
+++ bin/Makefile.am (working copy) |
50 |
@@ -4,6 +4,7 @@ |
51 |
dosed = @SED@ -e 's,\@BASH\@,$(BASH),g' \ |
52 |
@@ -42,7 +42,7 @@ Index: bin/Makefile.am |
53 |
% : %.in |
54 |
Index: bin/eselect.in |
55 |
=================================================================== |
56 |
---- bin/eselect.in (revision 803) |
57 |
+--- bin/eselect.in (revision 837) |
58 |
+++ bin/eselect.in (working copy) |
59 |
@@ -22,10 +22,15 @@ |
60 |
# Where are modules installed by default? |
61 |
@@ -64,8 +64,8 @@ Index: bin/eselect.in |
62 |
# Look in this place for libraries |
63 |
ESELECT_CORE_PATH="${ESELECT_DATA_PATH}/libs" |
64 |
--- libs/alternatives.bash.in.orig 1970-01-01 01:00:00.000000000 +0100 |
65 |
-+++ libs/alternatives.bash.in 2010-12-15 19:37:54.000000000 +0000 |
66 |
-@@ -0,0 +1,533 @@ |
67 |
++++ libs/alternatives.bash.in 2011-09-06 18:55:43.000000000 +0100 |
68 |
+@@ -0,0 +1,550 @@ |
69 |
+# Copyright 2008 Mike Kelly |
70 |
+# Copyright 2009 David Leverton |
71 |
+# Copyright 2010 Bo Ørsted Andresen |
72 |
@@ -75,7 +75,7 @@ Index: bin/eselect.in |
73 |
+inherit config output path-manipulation |
74 |
+ |
75 |
+ALTERNATIVESDIR_ROOTLESS="@sysconfdir@/env.d/alternatives" |
76 |
-+ALTERNATIVESDIR="${EROOT}${ALTERNATIVESDIR_ROOTLESS}" |
77 |
++ALTERNATIVESDIR="${ALTERNATIVESDIR_ROOTLESS}" |
78 |
+ |
79 |
+get_current_provider() { |
80 |
+ local dieprefix="Could not determine current provider for ${ALTERNATIVE}" |
81 |
@@ -244,29 +244,36 @@ Index: bin/eselect.in |
82 |
+ |
83 |
+describe_set_options() { |
84 |
+ echo "--force : overwrite or remove existing non-symlink files (but not directories) if necessary" |
85 |
-+ echo "<provider> : the name of the provider to use" |
86 |
++ echo "<provider> : the name of the provider to use or the index of the provider preceeded by a dash" |
87 |
+} |
88 |
+ |
89 |
+do_set() { |
90 |
+ [[ -z "${ALTERNATIVE}" ]] && die "Need to set ALTERNATIVE in the eselect module" |
91 |
+ |
92 |
-+ local force= |
93 |
++ local force provider providers |
94 |
+ if [[ ${1} == --force ]]; then |
95 |
+ force=yes |
96 |
+ shift |
97 |
+ fi |
98 |
+ |
99 |
-+ local provider="${1}" |
100 |
-+ [[ -z "${provider}" ]] && die -q "Missing required parameter 'provider'" |
101 |
-+ if is_number "${provider}" ; then |
102 |
-+ local providers=( $(get_providers) ) |
103 |
-+ (( ${provider} <= ${#providers[@]} )) || die -q "The given provider (${provider}) does not exist" |
104 |
-+ provider=${providers[${provider}-1]} |
105 |
++ if [[ ${1} == -+([[:digit:]]) ]]; then |
106 |
++ providers=( $(get_providers) ) |
107 |
++ (( ${1#-} <= ${#providers[@]} )) || die -q "The given provider with index (${1#-}) does not exist" |
108 |
++ provider=${providers[${1#-}-1]} |
109 |
++ else |
110 |
++ provider="${1}" |
111 |
+ fi |
112 |
++ [[ -z "${provider}" ]] && die -q "Missing required parameter 'provider'" |
113 |
+ local dieprefix="Could not set provider ${provider} for alternative ${ALTERNATIVE}" |
114 |
+ |
115 |
-+ [[ -d ${ALTERNATIVESDIR}/${ALTERNATIVE}/${provider} ]] \ |
116 |
-+ || die -q "The given provider (${provider}) does not exist" |
117 |
++ if [[ ! -d ${ALTERNATIVESDIR}/${ALTERNATIVE}/${provider} ]] ; then |
118 |
++ if is_number ${provider} ; then |
119 |
++ providers=( $(get_providers) ) |
120 |
++ [[ -n ${providers[${1#-}-1]} ]] && |
121 |
++ die -q "The given provider (${provider}) does not exist, did you mean -${provider} (${providers[${1#-}-1]})?" |
122 |
++ fi |
123 |
++ die -q "The given provider (${provider}) does not exist" |
124 |
++ fi |
125 |
+ |
126 |
+ local symlink newsymlinks=() oldsymlinks=() |
127 |
+ |
128 |
@@ -542,26 +549,36 @@ Index: bin/eselect.in |
129 |
+describe_script_options() { |
130 |
+ echo "--sh : use Bourne shell syntax (default)" |
131 |
+ echo "--csh : use C shell syntax" |
132 |
-+ echo "<provider> : the provider to use (if not specified, use the system default)" |
133 |
++ echo "<provider> : the provider to use or the index of the provider preceeded by a dash (if not specified, use the system default)" |
134 |
+} |
135 |
+ |
136 |
+do_script() { |
137 |
+ [[ -z "${ALTERNATIVE}" ]] && die "Need to set ALTERNATIVE in the eselect module" |
138 |
-+ local syntax=sh |
139 |
++ local syntax=sh provider providers |
140 |
+ if [[ ${1} == --sh ]]; then |
141 |
+ shift |
142 |
+ elif [[ ${1} == --csh ]]; then |
143 |
+ syntax=csh |
144 |
+ shift |
145 |
+ fi |
146 |
-+ local provider=${1} |
147 |
++ |
148 |
++ if [[ ${1} == -+([[:digit:]]) ]]; then |
149 |
++ providers=( $(get_providers) ) |
150 |
++ (( ${1#-} <= ${#providers[@]} )) || die -q "The given provider with index (${1#-}) does not exist" |
151 |
++ provider=${providers[${1#-}-1]} |
152 |
++ else |
153 |
++ provider="${1}" |
154 |
++ fi |
155 |
+ [[ -z "${provider}" ]] && die -q "Missing required parameter 'provider'" |
156 |
-+ if is_number "${provider}" ; then |
157 |
-+ local providers=( $(get_providers) ) |
158 |
-+ (( ${provider} <= ${#providers[@]} )) || die -q "The given provider (${provider}) does not exist" |
159 |
-+ provider=${providers[${provider}-1]} |
160 |
++ |
161 |
++ if [[ ! -d ${ALTERNATIVESDIR}/${ALTERNATIVE}/${provider} ]] ; then |
162 |
++ if is_number ${provider} ; then |
163 |
++ providers=( $(get_providers) ) |
164 |
++ [[ -n ${providers[${1#-}-1]} ]] && |
165 |
++ die -q "The given provider (${provider}) does not exist, did you mean -${provider} (${providers[${1#-}-1]})?" |
166 |
++ fi |
167 |
++ die -q "The given provider (${provider}) does not exist" |
168 |
+ fi |
169 |
-+ [[ -d ${ALTERNATIVESDIR}/${ALTERNATIVE}/${provider} ]] || die -q "The given provider (${provider}) does not exist" |
170 |
+ |
171 |
+ local variables=( PATH LD_LIBRARY_PATH MANPATH ) |
172 |
+ [[ -n ${!default_*} ]] && local ${!default_*} |