1 |
cardoe 08/10/06 18:53:14 |
2 |
|
3 |
Added: 0003-KV.patch 0001-msg-style.patch |
4 |
0002-useful-functions.patch |
5 |
Log: |
6 |
create 0.2.5 patch directory and copy current patches there. Use that directory for 0.2.5. Update live ebuild 0002 patch to current patch as the original one doesn't apply. bug #238904. Remove outdated versions. |
7 |
(Portage version: 2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-apps/openrc/files/0.2.5/0003-KV.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/files/0.2.5/0003-KV.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/files/0.2.5/0003-KV.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 0003-KV.patch |
16 |
=================================================================== |
17 |
From dac703b26c71cd8479b71d101c4e1ddb8eadc194 Mon Sep 17 00:00:00 2001 |
18 |
From: Mike Frysinger <vapier@g.o> |
19 |
Date: Mon, 24 Mar 2008 03:14:02 -0400 |
20 |
Subject: [PATCH] add back KV_* funcs |
21 |
|
22 |
--- |
23 |
sh/functions.sh.in | 35 +++++++++++++++++++++++++++++++++++ |
24 |
sh/runtests.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ |
25 |
2 files changed, 80 insertions(+), 0 deletions(-) |
26 |
|
27 |
diff --git a/sh/functions.sh.in b/sh/functions.sh.in |
28 |
index 140f6dc..0522792 100644 |
29 |
--- a/sh/functions.sh.in |
30 |
+++ b/sh/functions.sh.in |
31 |
@@ -65,6 +65,41 @@ get_bootparam() |
32 |
return 1 |
33 |
} |
34 |
|
35 |
+KV_major() { |
36 |
+ [ -z "$*" ] && return 1 |
37 |
+ local KV="$*" |
38 |
+ echo ${KV%%.*} |
39 |
+} |
40 |
+ |
41 |
+KV_minor() { |
42 |
+ [ -z "$*" ] && return 1 |
43 |
+ local KV="$*" |
44 |
+ KV=${KV#*.} |
45 |
+ echo ${KV%%.*} |
46 |
+} |
47 |
+ |
48 |
+KV_micro() { |
49 |
+ [ -z "$*" ] && return 1 |
50 |
+ local KV="$*" |
51 |
+ KV=${KV#*.*.} |
52 |
+ echo ${KV%%[![:digit:]]*} |
53 |
+} |
54 |
+ |
55 |
+KV_to_int() { |
56 |
+ [ -z "$*" ] && return 1 |
57 |
+ local KV_MAJOR="$(KV_major "$*")" |
58 |
+ local KV_MINOR="$(KV_minor "$*")" |
59 |
+ local KV_MICRO="$(KV_micro "$*")" |
60 |
+ local KV_int="$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))" |
61 |
+ echo "${KV_int}" |
62 |
+} |
63 |
+ |
64 |
+_RC_GET_KV_CACHE="" |
65 |
+get_KV() { |
66 |
+ [ -z ${_RC_GET_KV_CACHE} ] && _RC_GET_KV_CACHE=$(uname -r) |
67 |
+ echo $(KV_to_int "${_RC_GET_KV_CACHE}") |
68 |
+} |
69 |
+ |
70 |
_sanitize_path() |
71 |
{ |
72 |
local IFS=":" p= path= |
73 |
diff --git a/sh/runtests.sh b/sh/runtests.sh |
74 |
index d0d6a17..debcf4f 100755 |
75 |
--- a/sh/runtests.sh |
76 |
+++ b/sh/runtests.sh |
77 |
@@ -3,6 +3,19 @@ |
78 |
top_srcdir=${top_srcdir:-..} |
79 |
. ${top_srcdir}/test/setup_env.sh |
80 |
|
81 |
+checkit() { |
82 |
+ local output=$($1 $3) |
83 |
+ local lret=$? |
84 |
+ if [ ${lret} -ne 0 ] ; then |
85 |
+ ((tret+=lret)) |
86 |
+ echo "FAIL: exec: $*" |
87 |
+ fi |
88 |
+ if [ "${output}" != "$2" ] ; then |
89 |
+ ((tret+=lret)) |
90 |
+ echo "FAIL: output: $* : got='${output}' wanted='$2'" |
91 |
+ fi |
92 |
+} |
93 |
+ |
94 |
ret=0 |
95 |
|
96 |
tret=0 |
97 |
@@ -22,4 +35,36 @@ done |
98 |
eend ${tret} |
99 |
((ret+=tret)) |
100 |
|
101 |
+compare_int() { |
102 |
+ local got=$(KV_to_int $1) |
103 |
+ local exp=$(KV_to_int $3) |
104 |
+ if ! [ ${got} $2 ${exp} ] ; then |
105 |
+ ((tret+=1)) |
106 |
+ echo "FAIL: KV_to_int '${v}'(${got}) $2 '1.2.2'(${exp})" |
107 |
+ fi |
108 |
+} |
109 |
+ |
110 |
+tret=0 |
111 |
+ebegin "Testing KV_{major,minor,micro,to_int}" |
112 |
+for v in \ |
113 |
+ 1.2.3 1.2.3-rc0 1.2.3_rc0 "1.2.3 rc0" \ |
114 |
+ 1.2.3.4 1.2.3.4-rc0 1.2.3.4_rc0 "1.2.3.4 rc0" |
115 |
+do |
116 |
+ checkit KV_major 1 ${v} |
117 |
+ checkit KV_minor 2 ${v} |
118 |
+ checkit KV_micro 3 ${v} |
119 |
+ |
120 |
+ compare_int 1.2.2 -lt ${v} |
121 |
+ compare_int 1.2.2.10 -lt ${v} |
122 |
+ compare_int 1.2.4 -gt ${v} |
123 |
+ compare_int 1.2.4-rc0 -gt ${v} |
124 |
+ compare_int 1.2.3 -eq ${v} |
125 |
+ compare_int 1.2.3-rc0 -eq ${v} |
126 |
+ compare_int 1.2.3.2 -eq ${v} |
127 |
+ compare_int 1.2.3.3 -eq ${v} |
128 |
+ compare_int 1.2.3.4 -eq ${v} |
129 |
+done |
130 |
+eend ${tret} |
131 |
+((ret+=tret)) |
132 |
+ |
133 |
exit ${ret} |
134 |
-- |
135 |
1.5.4.4 |
136 |
|
137 |
|
138 |
|
139 |
|
140 |
1.1 sys-apps/openrc/files/0.2.5/0001-msg-style.patch |
141 |
|
142 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/files/0.2.5/0001-msg-style.patch?rev=1.1&view=markup |
143 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/files/0.2.5/0001-msg-style.patch?rev=1.1&content-type=text/plain |
144 |
|
145 |
Index: 0001-msg-style.patch |
146 |
=================================================================== |
147 |
From 1eddb56f11b41c4bf4f878c995c5d140b1f9d44d Mon Sep 17 00:00:00 2001 |
148 |
From: Mike Frysinger <vapier@g.o> |
149 |
Date: Mon, 24 Mar 2008 01:48:19 -0400 |
150 |
Subject: [PATCH] This reverts commit 0e2f160c95b15e95f3885e3f5a3670ec5ae0a709. 2 spaces in 80 cols has never made any sort of realistic difference and we're not going to change this behavior in Gentoo. |
151 |
|
152 |
--- |
153 |
src/libeinfo/libeinfo.c | 9 +++------ |
154 |
1 files changed, 3 insertions(+), 6 deletions(-) |
155 |
|
156 |
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c |
157 |
index f8ddcb5..c46cacb 100644 |
158 |
--- a/src/libeinfo/libeinfo.c |
159 |
+++ b/src/libeinfo/libeinfo.c |
160 |
@@ -787,7 +787,7 @@ static void _eend(FILE * __EINFO_RESTRICT fp, int col, ECOLOR color, |
161 |
if (! msg) |
162 |
return; |
163 |
|
164 |
- cols = get_term_columns(fp) - (strlen(msg) + 3); |
165 |
+ cols = get_term_columns(fp) - (strlen(msg) + 5); |
166 |
|
167 |
/* cons25 is special - we need to remove one char, otherwise things |
168 |
* do not align properly at all. */ |
169 |
@@ -801,18 +801,15 @@ static void _eend(FILE * __EINFO_RESTRICT fp, int col, ECOLOR color, |
170 |
if (term_is_cons25) |
171 |
cols--; |
172 |
|
173 |
- /* If extra spacing is required around msg, then please change |
174 |
- * via a runtime knob and leave this default as is as it saves 2 |
175 |
- * valuable columns when running on 80 column screens. */ |
176 |
if (cols > 0 && colour_terminal(fp)) { |
177 |
- fprintf(fp, "%s%s %s[%s%s%s]%s\n", up, tgoto(goto_column, 0, cols), |
178 |
+ fprintf(fp, "%s%s %s[%s %s %s]%s\n", up, tgoto(goto_column, 0, cols), |
179 |
ecolor(ECOLOR_BRACKET), ecolor(color), msg, |
180 |
ecolor(ECOLOR_BRACKET), ecolor(ECOLOR_NORMAL)); |
181 |
} else { |
182 |
if (col > 0) |
183 |
for (i = 0; i < cols - col; i++) |
184 |
fprintf(fp, " "); |
185 |
- fprintf(fp, " [%s]\n", msg); |
186 |
+ fprintf(fp, " [ %s ]\n", msg); |
187 |
} |
188 |
} |
189 |
|
190 |
-- |
191 |
1.5.4.4 |
192 |
|
193 |
|
194 |
|
195 |
|
196 |
1.1 sys-apps/openrc/files/0.2.5/0002-useful-functions.patch |
197 |
|
198 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/files/0.2.5/0002-useful-functions.patch?rev=1.1&view=markup |
199 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/files/0.2.5/0002-useful-functions.patch?rev=1.1&content-type=text/plain |
200 |
|
201 |
Index: 0002-useful-functions.patch |
202 |
=================================================================== |
203 |
From c5552432d21e964ea1dbda7415040259b87ea77e Mon Sep 17 00:00:00 2001 |
204 |
From: Mike Frysinger <vapier@g.o> |
205 |
Date: Mon, 24 Mar 2008 02:03:39 -0400 |
206 |
Subject: [PATCH] add a softlevel() function to the API so people dont have to worry about inner details and move get_bootparam back to the exported function.sh api |
207 |
|
208 |
--- |
209 |
sh/functions.sh.in | 27 +++++++++++++++++++++++++++ |
210 |
sh/rc-functions.sh.in | 22 ---------------------- |
211 |
2 files changed, 27 insertions(+), 22 deletions(-) |
212 |
|
213 |
diff --git a/sh/functions.sh.in b/sh/functions.sh.in |
214 |
index 1a1fbba..140f6dc 100644 |
215 |
--- a/sh/functions.sh.in |
216 |
+++ b/sh/functions.sh.in |
217 |
@@ -38,6 +38,28 @@ yesno() |
218 |
esac |
219 |
} |
220 |
|
221 |
+get_bootparam() |
222 |
+{ |
223 |
+ local match="$1" |
224 |
+ [ -z "${match}" -o ! -r /proc/cmdline ] && return 1 |
225 |
+ |
226 |
+ set -- $(cat /proc/cmdline) |
227 |
+ while [ -n "$1" ]; do |
228 |
+ case "$1" in |
229 |
+ gentoo=*) |
230 |
+ local params="${1##*=}" |
231 |
+ local IFS=, x= |
232 |
+ for x in ${params}; do |
233 |
+ [ "${x}" = "${match}" ] && return 0 |
234 |
+ done |
235 |
+ ;; |
236 |
+ esac |
237 |
+ shift |
238 |
+ done |
239 |
+ |
240 |
+ return 1 |
241 |
+} |
242 |
+ |
243 |
_sanitize_path() |
244 |
{ |
245 |
local IFS=":" p= path= |
246 |
diff --git a/sh/rc-functions.sh.in b/sh/rc-functions.sh.in |
247 |
index 74db71e..eb45e49 100644 |
248 |
--- a/sh/rc-functions.sh.in |
249 |
+++ b/sh/rc-functions.sh.in |
250 |
@@ -51,28 +51,6 @@ is_union_fs() |
251 |
unionctl "$1" --list >/dev/null 2>&1 |
252 |
} |
253 |
|
254 |
-get_bootparam() |
255 |
-{ |
256 |
- local match="$1" |
257 |
- [ -z "${match}" -o ! -r /proc/cmdline ] && return 1 |
258 |
- |
259 |
- set -- $(cat /proc/cmdline) |
260 |
- while [ -n "$1" ]; do |
261 |
- case "$1" in |
262 |
- gentoo=*) |
263 |
- local params="${1##*=}" |
264 |
- local IFS=, x= |
265 |
- for x in ${params}; do |
266 |
- [ "${x}" = "${match}" ] && return 0 |
267 |
- done |
268 |
- ;; |
269 |
- esac |
270 |
- shift |
271 |
- done |
272 |
- |
273 |
- return 1 |
274 |
-} |
275 |
- |
276 |
# Add our sbin to $PATH |
277 |
case "${PATH}" in |
278 |
@PREFIX@/lib/rc/sbin|@PREFIX@/lib/rc/sbin:*);; |
279 |
-- |
280 |
1.5.4.4 |