1 |
Author: zmedico |
2 |
Date: 2009-03-12 00:28:45 +0000 (Thu, 12 Mar 2009) |
3 |
New Revision: 13063 |
4 |
|
5 |
Added: |
6 |
main/trunk/bin/ebuild-helpers/ |
7 |
main/trunk/bin/ebuild-helpers/dobin |
8 |
main/trunk/bin/ebuild-helpers/doconfd |
9 |
main/trunk/bin/ebuild-helpers/dodir |
10 |
main/trunk/bin/ebuild-helpers/dodoc |
11 |
main/trunk/bin/ebuild-helpers/doenvd |
12 |
main/trunk/bin/ebuild-helpers/doexe |
13 |
main/trunk/bin/ebuild-helpers/dohard |
14 |
main/trunk/bin/ebuild-helpers/dohtml |
15 |
main/trunk/bin/ebuild-helpers/doinfo |
16 |
main/trunk/bin/ebuild-helpers/doinitd |
17 |
main/trunk/bin/ebuild-helpers/doins |
18 |
main/trunk/bin/ebuild-helpers/dolib |
19 |
main/trunk/bin/ebuild-helpers/dolib.a |
20 |
main/trunk/bin/ebuild-helpers/dolib.so |
21 |
main/trunk/bin/ebuild-helpers/doman |
22 |
main/trunk/bin/ebuild-helpers/domo |
23 |
main/trunk/bin/ebuild-helpers/dosbin |
24 |
main/trunk/bin/ebuild-helpers/dosed |
25 |
main/trunk/bin/ebuild-helpers/dosym |
26 |
main/trunk/bin/ebuild-helpers/ecompress |
27 |
main/trunk/bin/ebuild-helpers/ecompressdir |
28 |
main/trunk/bin/ebuild-helpers/emake |
29 |
main/trunk/bin/ebuild-helpers/fowners |
30 |
main/trunk/bin/ebuild-helpers/fperms |
31 |
main/trunk/bin/ebuild-helpers/newbin |
32 |
main/trunk/bin/ebuild-helpers/newconfd |
33 |
main/trunk/bin/ebuild-helpers/newdoc |
34 |
main/trunk/bin/ebuild-helpers/newenvd |
35 |
main/trunk/bin/ebuild-helpers/newexe |
36 |
main/trunk/bin/ebuild-helpers/newinitd |
37 |
main/trunk/bin/ebuild-helpers/newins |
38 |
main/trunk/bin/ebuild-helpers/newlib.a |
39 |
main/trunk/bin/ebuild-helpers/newlib.so |
40 |
main/trunk/bin/ebuild-helpers/newman |
41 |
main/trunk/bin/ebuild-helpers/newsbin |
42 |
main/trunk/bin/ebuild-helpers/portageq |
43 |
main/trunk/bin/ebuild-helpers/prepall |
44 |
main/trunk/bin/ebuild-helpers/prepalldocs |
45 |
main/trunk/bin/ebuild-helpers/prepallinfo |
46 |
main/trunk/bin/ebuild-helpers/prepallman |
47 |
main/trunk/bin/ebuild-helpers/prepallstrip |
48 |
main/trunk/bin/ebuild-helpers/prepinfo |
49 |
main/trunk/bin/ebuild-helpers/preplib |
50 |
main/trunk/bin/ebuild-helpers/prepman |
51 |
main/trunk/bin/ebuild-helpers/prepstrip |
52 |
main/trunk/bin/ebuild-helpers/sed |
53 |
Removed: |
54 |
main/trunk/bin/dobin |
55 |
main/trunk/bin/doconfd |
56 |
main/trunk/bin/dodir |
57 |
main/trunk/bin/dodoc |
58 |
main/trunk/bin/doenvd |
59 |
main/trunk/bin/doexe |
60 |
main/trunk/bin/dohard |
61 |
main/trunk/bin/dohtml |
62 |
main/trunk/bin/doinfo |
63 |
main/trunk/bin/doinitd |
64 |
main/trunk/bin/doins |
65 |
main/trunk/bin/dolib |
66 |
main/trunk/bin/dolib.a |
67 |
main/trunk/bin/dolib.so |
68 |
main/trunk/bin/doman |
69 |
main/trunk/bin/domo |
70 |
main/trunk/bin/dosbin |
71 |
main/trunk/bin/dosed |
72 |
main/trunk/bin/dosym |
73 |
main/trunk/bin/ecompress |
74 |
main/trunk/bin/ecompressdir |
75 |
main/trunk/bin/emake |
76 |
main/trunk/bin/fowners |
77 |
main/trunk/bin/fperms |
78 |
main/trunk/bin/newbin |
79 |
main/trunk/bin/newconfd |
80 |
main/trunk/bin/newdoc |
81 |
main/trunk/bin/newenvd |
82 |
main/trunk/bin/newexe |
83 |
main/trunk/bin/newinitd |
84 |
main/trunk/bin/newins |
85 |
main/trunk/bin/newlib.a |
86 |
main/trunk/bin/newlib.so |
87 |
main/trunk/bin/newman |
88 |
main/trunk/bin/newsbin |
89 |
main/trunk/bin/prepall |
90 |
main/trunk/bin/prepalldocs |
91 |
main/trunk/bin/prepallinfo |
92 |
main/trunk/bin/prepallman |
93 |
main/trunk/bin/prepallstrip |
94 |
main/trunk/bin/prepinfo |
95 |
main/trunk/bin/preplib |
96 |
main/trunk/bin/prepman |
97 |
main/trunk/bin/prepstrip |
98 |
main/trunk/bin/sed |
99 |
Modified: |
100 |
main/trunk/bin/ebuild.sh |
101 |
main/trunk/bin/misc-functions.sh |
102 |
main/trunk/pym/portage/tests/bin/setup_env.py |
103 |
Log: |
104 |
Move ebuild helpers into an ebuild-helpers subdirectory. |
105 |
|
106 |
|
107 |
Deleted: main/trunk/bin/dobin |
108 |
=================================================================== |
109 |
--- main/trunk/bin/dobin 2009-03-12 00:25:50 UTC (rev 13062) |
110 |
+++ main/trunk/bin/dobin 2009-03-12 00:28:45 UTC (rev 13063) |
111 |
@@ -1,29 +0,0 @@ |
112 |
-#!/bin/bash |
113 |
-# Copyright 1999-2006 Gentoo Foundation |
114 |
-# Distributed under the terms of the GNU General Public License v2 |
115 |
-# $Id$ |
116 |
- |
117 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
118 |
- |
119 |
-if [[ $# -lt 1 ]] ; then |
120 |
- vecho "$0: at least one argument needed" 1>&2 |
121 |
- exit 1 |
122 |
-fi |
123 |
- |
124 |
-if [[ ! -d ${D}${DESTTREE}/bin ]] ; then |
125 |
- install -d "${D}${DESTTREE}/bin" || exit 2 |
126 |
-fi |
127 |
- |
128 |
-ret=0 |
129 |
- |
130 |
-for x in "$@" ; do |
131 |
- if [[ -e ${x} ]] ; then |
132 |
- install -m0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/bin" |
133 |
- else |
134 |
- echo "!!! ${0##*/}: $x does not exist" 1>&2 |
135 |
- false |
136 |
- fi |
137 |
- ((ret+=$?)) |
138 |
-done |
139 |
- |
140 |
-exit ${ret} |
141 |
|
142 |
Deleted: main/trunk/bin/doconfd |
143 |
=================================================================== |
144 |
--- main/trunk/bin/doconfd 2009-03-12 00:25:50 UTC (rev 13062) |
145 |
+++ main/trunk/bin/doconfd 2009-03-12 00:28:45 UTC (rev 13063) |
146 |
@@ -1,14 +0,0 @@ |
147 |
-#!/bin/bash |
148 |
-# Copyright 1999-2006 Gentoo Foundation |
149 |
-# Distributed under the terms of the GNU General Public License v2 |
150 |
-# $Id$ |
151 |
- |
152 |
-if [[ $# -lt 1 ]] ; then |
153 |
- echo "$0: at least one argument needed" 1>&2 |
154 |
- exit 1 |
155 |
-fi |
156 |
- |
157 |
-exec \ |
158 |
-env \ |
159 |
-INSDESTTREE="/etc/conf.d/" \ |
160 |
-doins "$@" |
161 |
|
162 |
Deleted: main/trunk/bin/dodir |
163 |
=================================================================== |
164 |
--- main/trunk/bin/dodir 2009-03-12 00:25:50 UTC (rev 13062) |
165 |
+++ main/trunk/bin/dodir 2009-03-12 00:28:45 UTC (rev 13063) |
166 |
@@ -1,6 +0,0 @@ |
167 |
-#!/bin/bash |
168 |
-# Copyright 1999-2006 Gentoo Foundation |
169 |
-# Distributed under the terms of the GNU General Public License v2 |
170 |
-# $Id$ |
171 |
- |
172 |
-exec install -d ${DIROPTIONS} "${@/#/${D}/}" |
173 |
|
174 |
Deleted: main/trunk/bin/dodoc |
175 |
=================================================================== |
176 |
--- main/trunk/bin/dodoc 2009-03-12 00:25:50 UTC (rev 13062) |
177 |
+++ main/trunk/bin/dodoc 2009-03-12 00:28:45 UTC (rev 13063) |
178 |
@@ -1,28 +0,0 @@ |
179 |
-#!/bin/bash |
180 |
-# Copyright 1999-2007 Gentoo Foundation |
181 |
-# Distributed under the terms of the GNU General Public License v2 |
182 |
-# $Id$ |
183 |
- |
184 |
-if [ $# -lt 1 ] ; then |
185 |
- source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
186 |
- vecho "${0##*/}: at least one argument needed" 1>&2 |
187 |
- exit 1 |
188 |
-fi |
189 |
- |
190 |
-dir="${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" |
191 |
-if [ ! -d "${dir}" ] ; then |
192 |
- install -d "${dir}" |
193 |
-fi |
194 |
- |
195 |
-ret=0 |
196 |
-for x in "$@" ; do |
197 |
- if [ -s "${x}" ] ; then |
198 |
- install -m0644 "${x}" "${dir}" |
199 |
- ecompress --queue "${dir}/${x##*/}" |
200 |
- elif [ ! -e "${x}" ] ; then |
201 |
- echo "!!! ${0##*/}: $x does not exist" 1>&2 |
202 |
- ((++ret)) |
203 |
- fi |
204 |
-done |
205 |
- |
206 |
-exit ${ret} |
207 |
|
208 |
Deleted: main/trunk/bin/doenvd |
209 |
=================================================================== |
210 |
--- main/trunk/bin/doenvd 2009-03-12 00:25:50 UTC (rev 13062) |
211 |
+++ main/trunk/bin/doenvd 2009-03-12 00:28:45 UTC (rev 13063) |
212 |
@@ -1,14 +0,0 @@ |
213 |
-#!/bin/bash |
214 |
-# Copyright 1999-2006 Gentoo Foundation |
215 |
-# Distributed under the terms of the GNU General Public License v2 |
216 |
-# $Id$ |
217 |
- |
218 |
-if [[ $# -lt 1 ]] ; then |
219 |
- echo "$0: at least one argument needed" 1>&2 |
220 |
- exit 1 |
221 |
-fi |
222 |
- |
223 |
-exec \ |
224 |
-env \ |
225 |
-INSDESTTREE="/etc/env.d/" \ |
226 |
-doins "$@" |
227 |
|
228 |
Deleted: main/trunk/bin/doexe |
229 |
=================================================================== |
230 |
--- main/trunk/bin/doexe 2009-03-12 00:25:50 UTC (rev 13062) |
231 |
+++ main/trunk/bin/doexe 2009-03-12 00:28:45 UTC (rev 13063) |
232 |
@@ -1,29 +0,0 @@ |
233 |
-#!/bin/bash |
234 |
-# Copyright 1999-2007 Gentoo Foundation |
235 |
-# Distributed under the terms of the GNU General Public License v2 |
236 |
-# $Id$ |
237 |
- |
238 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
239 |
- |
240 |
-if [[ $# -lt 1 ]] ; then |
241 |
- echo "$0: at least one argument needed" 1>&2 |
242 |
- exit 1 |
243 |
-fi |
244 |
- |
245 |
-if [[ ! -d ${D}${_E_EXEDESTTREE_} ]] ; then |
246 |
- install -d "${D}${_E_EXEDESTTREE_}" |
247 |
-fi |
248 |
- |
249 |
-for x in "$@" ; do |
250 |
- if [ -L "${x}" ] ; then |
251 |
- cp "${x}" "${T}" |
252 |
- mysrc="${T}"/$(/usr/bin/basename "${x}") |
253 |
- elif [ -d "${x}" ] ; then |
254 |
- vecho "doexe: warning, skipping directory ${x}" |
255 |
- continue |
256 |
- else |
257 |
- mysrc="${x}" |
258 |
- fi |
259 |
- install $EXEOPTIONS "$mysrc" "$D$_E_EXEDESTTREE_" || \ |
260 |
- echo "!!! ${0##*/}: $mysrc does not exist" 1>&2 |
261 |
-done |
262 |
|
263 |
Deleted: main/trunk/bin/dohard |
264 |
=================================================================== |
265 |
--- main/trunk/bin/dohard 2009-03-12 00:25:50 UTC (rev 13062) |
266 |
+++ main/trunk/bin/dohard 2009-03-12 00:28:45 UTC (rev 13063) |
267 |
@@ -1,14 +0,0 @@ |
268 |
-#!/bin/bash |
269 |
-# Copyright 1999-2007 Gentoo Foundation |
270 |
-# Distributed under the terms of the GNU General Public License v2 |
271 |
-# $Id$ |
272 |
- |
273 |
-if [[ $# -ne 2 ]] ; then |
274 |
- echo "$0: two arguments needed" 1>&2 |
275 |
- exit 1 |
276 |
-fi |
277 |
- |
278 |
-destdir=${2%/*} |
279 |
-[[ ! -d ${D}${destdir} ]] && dodir "${destdir}" |
280 |
- |
281 |
-exec ln -f "${D}$1" "${D}$2" |
282 |
|
283 |
Deleted: main/trunk/bin/dohtml |
284 |
=================================================================== |
285 |
--- main/trunk/bin/dohtml 2009-03-12 00:25:50 UTC (rev 13062) |
286 |
+++ main/trunk/bin/dohtml 2009-03-12 00:28:45 UTC (rev 13063) |
287 |
@@ -1,186 +0,0 @@ |
288 |
-#!/usr/bin/python |
289 |
-# Copyright 1999-2006 Gentoo Foundation |
290 |
-# Distributed under the terms of the GNU General Public License v2 |
291 |
-# $Id$ |
292 |
- |
293 |
-# |
294 |
-# Typical usage: |
295 |
-# dohtml -r docs/* |
296 |
-# - put all files and directories in docs into /usr/share/doc/${PF}/html |
297 |
-# dohtml foo.html |
298 |
-# - put foo.html into /usr/share/doc/${PF}/html |
299 |
-# |
300 |
-# |
301 |
-# Detailed usage: |
302 |
-# dohtml <list-of-files> |
303 |
-# - will install the files in the list of files (space-separated list) into |
304 |
-# /usr/share/doc/${PF}/html, provided the file ends in .htm, .html, .css, |
305 |
-# .js, ,gif, .jpeg, .jpg, or .png. |
306 |
-# dohtml -r <list-of-files-and-directories> |
307 |
-# - will do as 'dohtml', but recurse into all directories, as long as the |
308 |
-# directory name is not CVS |
309 |
-# dohtml -A jpe,java [-r] <list-of-files[-and-directories]> |
310 |
-# - will do as 'dohtml' but add .jpe,.java (default filter list is |
311 |
-# added to your list) |
312 |
-# dohtml -a png,gif,html,htm [-r] <list-of-files[-and-directories]> |
313 |
-# - will do as 'dohtml' but filter on .png,.gif,.html,.htm (default filter |
314 |
-# list is ignored) |
315 |
-# dohtml -x CVS,SCCS,RCS -r <list-of-files-and-directories> |
316 |
-# - will do as 'dohtml -r', but ignore directories named CVS, SCCS, RCS |
317 |
-# |
318 |
- |
319 |
-import os |
320 |
-import sys |
321 |
- |
322 |
-def dodir(path): |
323 |
- os.spawnlp(os.P_WAIT, "install", "install", "-d", path) |
324 |
- |
325 |
-def dofile(src,dst): |
326 |
- os.spawnlp(os.P_WAIT, "install", "install", "-m0644", src, dst) |
327 |
- |
328 |
-def eqawarn(lines): |
329 |
- cmd = "source '%s/isolated-functions.sh' ; " % \ |
330 |
- os.environ["PORTAGE_BIN_PATH"] |
331 |
- for line in lines: |
332 |
- cmd += "eqawarn \"%s\" ; " % line |
333 |
- os.spawnlp(os.P_WAIT, "bash", "bash", "-c", cmd) |
334 |
- |
335 |
-skipped_directories = [] |
336 |
- |
337 |
-def install(basename, dirname, options, prefix=""): |
338 |
- fullpath = basename |
339 |
- if prefix: |
340 |
- fullpath = prefix + "/" + fullpath |
341 |
- if dirname: |
342 |
- fullpath = dirname + "/" + fullpath |
343 |
- |
344 |
- if options.DOCDESTTREE: |
345 |
- destdir = options.D + "usr/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix |
346 |
- else: |
347 |
- destdir = options.D + "usr/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix |
348 |
- |
349 |
- if os.path.isfile(fullpath): |
350 |
- ext = os.path.splitext(basename)[1] |
351 |
- if (len(ext) and ext[1:] in options.allowed_exts) or basename in options.allowed_files: |
352 |
- dodir(destdir) |
353 |
- dofile(fullpath, destdir + "/" + basename) |
354 |
- elif options.recurse and os.path.isdir(fullpath) and \ |
355 |
- basename not in options.disallowed_dirs: |
356 |
- for i in os.listdir(fullpath): |
357 |
- pfx = basename |
358 |
- if prefix: pfx = prefix + "/" + pfx |
359 |
- install(i, dirname, options, pfx) |
360 |
- elif not options.recurse and os.path.isdir(fullpath): |
361 |
- global skipped_directories |
362 |
- skipped_directories.append(fullpath) |
363 |
- return False |
364 |
- else: |
365 |
- return False |
366 |
- return True |
367 |
- |
368 |
- |
369 |
-class OptionsClass: |
370 |
- def __init__(self): |
371 |
- self.PF = "" |
372 |
- self.D = "" |
373 |
- self.DOCDESTTREE = "" |
374 |
- |
375 |
- if "PF" in os.environ: |
376 |
- self.PF = os.environ["PF"] |
377 |
- if "D" in os.environ: |
378 |
- self.D = os.environ["D"] |
379 |
- if "_E_DOCDESTTREE_" in os.environ: |
380 |
- self.DOCDESTTREE = os.environ["_E_DOCDESTTREE_"] |
381 |
- |
382 |
- self.allowed_exts = [ 'htm', 'html', 'css', 'js', |
383 |
- 'gif', 'jpeg', 'jpg', 'png' ] |
384 |
- self.allowed_files = [] |
385 |
- self.disallowed_dirs = [ 'CVS' ] |
386 |
- self.recurse = False |
387 |
- self.verbose = False |
388 |
- self.doc_prefix = "" |
389 |
- |
390 |
-def print_help(): |
391 |
- opts = OptionsClass() |
392 |
- |
393 |
- print "dohtml [-a .foo,.bar] [-A .foo,.bar] [-f foo,bar] [-x foo,bar]" |
394 |
- print " [-r] [-V] <file> [file ...]" |
395 |
- print |
396 |
- print " -a Set the list of allowed to those that are specified." |
397 |
- print " Default:", ",".join(opts.allowed_exts) |
398 |
- print " -A Extend the list of allowed file types." |
399 |
- print " -f Set list of allowed extensionless file names." |
400 |
- print " -x Set directories to be excluded from recursion." |
401 |
- print " Default:", ",".join(opts.disallowed_dirs) |
402 |
- print " -p Set a document prefix for installed files (empty by default)." |
403 |
- print " -r Install files and directories recursively." |
404 |
- print " -V Be verbose." |
405 |
- print |
406 |
- |
407 |
-def parse_args(): |
408 |
- options = OptionsClass() |
409 |
- args = [] |
410 |
- |
411 |
- x = 1 |
412 |
- while x < len(sys.argv): |
413 |
- arg = sys.argv[x] |
414 |
- if arg in ["-h","-r","-V"]: |
415 |
- if arg == "-h": |
416 |
- print_help() |
417 |
- sys.exit(0) |
418 |
- elif arg == "-r": |
419 |
- options.recurse = True |
420 |
- elif arg == "-V": |
421 |
- options.verbose = True |
422 |
- elif sys.argv[x] in ["-A","-a","-f","-x","-p"]: |
423 |
- x += 1 |
424 |
- if x == len(sys.argv): |
425 |
- print_help() |
426 |
- sys.exit(0) |
427 |
- elif arg == "-p": |
428 |
- options.doc_prefix = sys.argv[x] |
429 |
- else: |
430 |
- values = sys.argv[x].split(",") |
431 |
- if arg == "-A": |
432 |
- options.allowed_exts.extend(values) |
433 |
- elif arg == "-a": |
434 |
- options.allowed_exts = values |
435 |
- elif arg == "-f": |
436 |
- options.allowed_files = values |
437 |
- elif arg == "-x": |
438 |
- options.disallowed_dirs = values |
439 |
- else: |
440 |
- args.append(sys.argv[x]) |
441 |
- x += 1 |
442 |
- |
443 |
- return (options, args) |
444 |
- |
445 |
-def main(): |
446 |
- |
447 |
- (options, args) = parse_args() |
448 |
- |
449 |
- if options.verbose: |
450 |
- print "Allowed extensions:", options.allowed_exts |
451 |
- print "Document prefix : '" + options.doc_prefix + "'" |
452 |
- print "Allowed files :", options.allowed_files |
453 |
- |
454 |
- success = False |
455 |
- |
456 |
- for x in args: |
457 |
- basename = os.path.basename(x) |
458 |
- dirname = os.path.dirname(x) |
459 |
- success |= install(basename, dirname, options) |
460 |
- |
461 |
- if success: |
462 |
- retcode = 0 |
463 |
- else: |
464 |
- retcode = 1 |
465 |
- global skipped_directories |
466 |
- for x in skipped_directories: |
467 |
- eqawarn(["QA Notice: dohtml on directory " + \ |
468 |
- "'%s' without recursion option" % x]) |
469 |
- |
470 |
- sys.exit(retcode) |
471 |
- |
472 |
-if __name__ == "__main__": |
473 |
- main() |
474 |
|
475 |
Deleted: main/trunk/bin/doinfo |
476 |
=================================================================== |
477 |
--- main/trunk/bin/doinfo 2009-03-12 00:25:50 UTC (rev 13062) |
478 |
+++ main/trunk/bin/doinfo 2009-03-12 00:28:45 UTC (rev 13063) |
479 |
@@ -1,22 +0,0 @@ |
480 |
-#!/bin/bash |
481 |
-# Copyright 1999-2007 Gentoo Foundation |
482 |
-# Distributed under the terms of the GNU General Public License v2 |
483 |
-# $Id$ |
484 |
- |
485 |
-if [[ -z $1 ]] ; then |
486 |
- vecho "${0##*/}: at least one argument needed" |
487 |
- exit 1 |
488 |
-fi |
489 |
- |
490 |
-if [[ ! -d ${D}usr/share/info ]] ; then |
491 |
- install -d "${D}usr/share/info" || exit 1 |
492 |
-fi |
493 |
- |
494 |
-install -m0644 "$@" "${D}usr/share/info" |
495 |
-rval=$? |
496 |
-if [ $rval -ne 0 ] ; then |
497 |
- for x in "$@" ; do |
498 |
- [ -e "$x" ] || echo "!!! ${0##*/}: $x does not exist" 1>&2 |
499 |
- done |
500 |
-fi |
501 |
-exit $rval |
502 |
|
503 |
Deleted: main/trunk/bin/doinitd |
504 |
=================================================================== |
505 |
--- main/trunk/bin/doinitd 2009-03-12 00:25:50 UTC (rev 13062) |
506 |
+++ main/trunk/bin/doinitd 2009-03-12 00:28:45 UTC (rev 13063) |
507 |
@@ -1,14 +0,0 @@ |
508 |
-#!/bin/bash |
509 |
-# Copyright 1999-2007 Gentoo Foundation |
510 |
-# Distributed under the terms of the GNU General Public License v2 |
511 |
-# $Id$ |
512 |
- |
513 |
-if [[ $# -lt 1 ]] ; then |
514 |
- echo "$0: at least one argument needed" 1>&2 |
515 |
- exit 1 |
516 |
-fi |
517 |
- |
518 |
-exec \ |
519 |
-env \ |
520 |
-_E_EXEDESTTREE_="/etc/init.d/" \ |
521 |
-doexe "$@" |
522 |
|
523 |
Deleted: main/trunk/bin/doins |
524 |
=================================================================== |
525 |
--- main/trunk/bin/doins 2009-03-12 00:25:50 UTC (rev 13062) |
526 |
+++ main/trunk/bin/doins 2009-03-12 00:28:45 UTC (rev 13063) |
527 |
@@ -1,98 +0,0 @@ |
528 |
-#!/bin/bash |
529 |
-# Copyright 1999-2007 Gentoo Foundation |
530 |
-# Distributed under the terms of the GNU General Public License v2 |
531 |
-# $Id$ |
532 |
- |
533 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
534 |
- |
535 |
-if [ $# -lt 1 ] ; then |
536 |
- echo "${0##*/}: at least one argument needed" 1>&2 |
537 |
- exit 1 |
538 |
-fi |
539 |
- |
540 |
-if [[ "$1" == "-r" ]] ; then |
541 |
- DOINSRECUR=y |
542 |
- shift |
543 |
-else |
544 |
- DOINSRECUR=n |
545 |
-fi |
546 |
- |
547 |
-if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then |
548 |
- vecho "-------------------------------------------------------" 1>&2 |
549 |
- vecho "You should not use \${D} with helpers." 1>&2 |
550 |
- vecho " --> ${INSDESTTREE}" 1>&2 |
551 |
- vecho "-------------------------------------------------------" 1>&2 |
552 |
- exit 1 |
553 |
-fi |
554 |
- |
555 |
-export TMP=$T/.doins_tmp |
556 |
-# Use separate directories to avoid potential name collisions. |
557 |
-mkdir -p "$TMP"/{1,2} |
558 |
- |
559 |
-[[ ! -d ${D}${INSDESTTREE} ]] && dodir "${INSDESTTREE}" |
560 |
- |
561 |
-_doins() { |
562 |
- local mysrc="$1" mydir="$2" cleanup="" rval |
563 |
- |
564 |
- if [ -L "$mysrc" ] ; then |
565 |
- cp "$mysrc" "$TMP/2" |
566 |
- mysrc="$TMP/2/${mysrc##*/}" |
567 |
- cleanup=${mysrc} |
568 |
- fi |
569 |
- |
570 |
- install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}/${mydir}" |
571 |
- rval=$? |
572 |
- [[ -n ${cleanup} ]] && rm -f "${cleanup}" |
573 |
- [ $rval -ne 0 ] && echo "!!! ${0##*/}: $mysrc does not exist" 1>&2 |
574 |
- return $rval |
575 |
-} |
576 |
- |
577 |
-_xdoins() { |
578 |
- while read -d $'\0' x ; do |
579 |
- _doins "$x" "${x%/*}" |
580 |
- done |
581 |
-} |
582 |
- |
583 |
-success=0 |
584 |
- |
585 |
-for x in "$@" ; do |
586 |
- if [ -d "$x" ] ; then |
587 |
- if [ "${DOINSRECUR}" == "n" ] ; then |
588 |
- continue |
589 |
- fi |
590 |
- |
591 |
- while [ "$x" != "${x%/}" ] ; do |
592 |
- x=${x%/} |
593 |
- done |
594 |
- if [ "$x" = "${x%/*}" ] ; then |
595 |
- pushd "$PWD" >/dev/null |
596 |
- else |
597 |
- pushd "${x%/*}" >/dev/null |
598 |
- fi |
599 |
- x=${x##*/} |
600 |
- x_orig=$x |
601 |
- # Follow any symlinks recursively until we've got |
602 |
- # a normal directory for 'find' to traverse. |
603 |
- while [ -L "$x" ] ; do |
604 |
- pushd "$(readlink "$x")" >/dev/null |
605 |
- x=${PWD##*/} |
606 |
- pushd "${PWD%/*}" >/dev/null |
607 |
- done |
608 |
- if [[ $x != $x_orig ]] ; then |
609 |
- mv "$x" "$TMP/1/$x_orig" |
610 |
- pushd "$TMP/1" >/dev/null |
611 |
- fi |
612 |
- find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \; |
613 |
- find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins |
614 |
- if [[ $x != $x_orig ]] ; then |
615 |
- popd >/dev/null |
616 |
- mv "$TMP/1/$x_orig" "$x" |
617 |
- fi |
618 |
- while popd >/dev/null 2>&1 ; do true ; done |
619 |
- ((++success)) |
620 |
- else |
621 |
- _doins "${x}" && ((++success)) |
622 |
- fi |
623 |
-done |
624 |
-rm -rf "$TMP" |
625 |
-[ $success -gt 0 ] && exit 0 || exit 1 |
626 |
|
627 |
Deleted: main/trunk/bin/dolib |
628 |
=================================================================== |
629 |
--- main/trunk/bin/dolib 2009-03-12 00:25:50 UTC (rev 13062) |
630 |
+++ main/trunk/bin/dolib 2009-03-12 00:28:45 UTC (rev 13063) |
631 |
@@ -1,41 +0,0 @@ |
632 |
-#!/bin/bash |
633 |
-# Copyright 1999-2006 Gentoo Foundation |
634 |
-# Distributed under the terms of the GNU General Public License v2 |
635 |
-# $Id$ |
636 |
- |
637 |
-# Setup ABI cruft |
638 |
-LIBDIR_VAR="LIBDIR_${ABI}" |
639 |
-if [[ -n ${ABI} && -n ${!LIBDIR_VAR} ]] ; then |
640 |
- CONF_LIBDIR=${!LIBDIR_VAR} |
641 |
-fi |
642 |
-unset LIBDIR_VAR |
643 |
-# we need this to default to lib so that things dont break |
644 |
-CONF_LIBDIR=${CONF_LIBDIR:-lib} |
645 |
-libdir="${D}${DESTTREE}/${CONF_LIBDIR}" |
646 |
- |
647 |
- |
648 |
-if [[ $# -lt 1 ]] ; then |
649 |
- echo "$0: at least one argument needed" 1>&2 |
650 |
- exit 1 |
651 |
-fi |
652 |
-if [[ ! -d ${libdir} ]] ; then |
653 |
- install -d "${libdir}" || exit 1 |
654 |
-fi |
655 |
- |
656 |
-ret=0 |
657 |
- |
658 |
-for x in "$@" ; do |
659 |
- if [[ -e ${x} ]] ; then |
660 |
- if [[ ! -L ${x} ]] ; then |
661 |
- install ${LIBOPTIONS} "${x}" "${libdir}" |
662 |
- else |
663 |
- ln -s "$(readlink "${x}")" "${libdir}/${x##*/}" |
664 |
- fi |
665 |
- else |
666 |
- echo "!!! ${0##*/}: ${x} does not exist" 1>&2 |
667 |
- false |
668 |
- fi |
669 |
- ((ret+=$?)) |
670 |
-done |
671 |
- |
672 |
-exit ${ret} |
673 |
|
674 |
Deleted: main/trunk/bin/dolib.a |
675 |
=================================================================== |
676 |
--- main/trunk/bin/dolib.a 2009-03-12 00:25:50 UTC (rev 13062) |
677 |
+++ main/trunk/bin/dolib.a 2009-03-12 00:28:45 UTC (rev 13063) |
678 |
@@ -1,7 +0,0 @@ |
679 |
-#!/bin/bash |
680 |
-# Copyright 1999-2006 Gentoo Foundation |
681 |
-# Distributed under the terms of the GNU General Public License v2 |
682 |
-# $Id$ |
683 |
- |
684 |
-exec env LIBOPTIONS="-m0644" \ |
685 |
- dolib "$@" |
686 |
|
687 |
Deleted: main/trunk/bin/dolib.so |
688 |
=================================================================== |
689 |
--- main/trunk/bin/dolib.so 2009-03-12 00:25:50 UTC (rev 13062) |
690 |
+++ main/trunk/bin/dolib.so 2009-03-12 00:28:45 UTC (rev 13063) |
691 |
@@ -1,7 +0,0 @@ |
692 |
-#!/bin/bash |
693 |
-# Copyright 1999-2006 Gentoo Foundation |
694 |
-# Distributed under the terms of the GNU General Public License v2 |
695 |
-# $Id$ |
696 |
- |
697 |
-exec env LIBOPTIONS="-m0755" \ |
698 |
- dolib "$@" |
699 |
|
700 |
Deleted: main/trunk/bin/doman |
701 |
=================================================================== |
702 |
--- main/trunk/bin/doman 2009-03-12 00:25:50 UTC (rev 13062) |
703 |
+++ main/trunk/bin/doman 2009-03-12 00:28:45 UTC (rev 13063) |
704 |
@@ -1,62 +0,0 @@ |
705 |
-#!/bin/bash |
706 |
-# Copyright 1999-2006 Gentoo Foundation |
707 |
-# Distributed under the terms of the GNU General Public License v2 |
708 |
-# $Id$ |
709 |
- |
710 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
711 |
- |
712 |
-if [[ $# -lt 1 ]] ; then |
713 |
- echo "$0: at least one argument needed" 1>&2 |
714 |
- exit 1 |
715 |
-fi |
716 |
- |
717 |
-i18n="" |
718 |
- |
719 |
-ret=0 |
720 |
- |
721 |
-for x in "$@" ; do |
722 |
- if [[ ${x:0:6} == "-i18n=" ]] ; then |
723 |
- i18n=${x:6}/ |
724 |
- continue |
725 |
- fi |
726 |
- if [[ ${x:0:6} == ".keep_" ]] ; then |
727 |
- continue |
728 |
- fi |
729 |
- |
730 |
- suffix=${x##*.} |
731 |
- |
732 |
- # These will be automatically decompressed by ecompressdir. |
733 |
- if hasq ${suffix} Z gz bz2 ; then |
734 |
- realname=${x%.*} |
735 |
- suffix=${realname##*.} |
736 |
- fi |
737 |
- |
738 |
- if ! hasq "${EAPI:-0}" 0 1 && \ |
739 |
- [[ $x =~ (.*)\.([a-z][a-z](_[A-Z][A-Z])?)\.(.*) ]] ; then |
740 |
- name=${BASH_REMATCH[1]##*/}.${BASH_REMATCH[4]} |
741 |
- mandir=${BASH_REMATCH[2]}/man${suffix:0:1} |
742 |
- else |
743 |
- name=${x##*/} |
744 |
- mandir=${i18n}man${suffix:0:1} |
745 |
- fi |
746 |
- |
747 |
- |
748 |
- if [[ ${mandir} =~ man[0-9n](f|p|pm)?$ ]] ; then |
749 |
- if [[ -s ${x} ]] ; then |
750 |
- if [[ ! -d ${D}/usr/share/man/${mandir} ]] ; then |
751 |
- install -d "${D}/usr/share/man/${mandir}" |
752 |
- fi |
753 |
- |
754 |
- install -m0644 "${x}" "${D}/usr/share/man/${mandir}/${name}" |
755 |
- ((ret+=$?)) |
756 |
- elif [[ ! -e ${x} ]] ; then |
757 |
- echo "!!! ${0##*/}: $x does not exist" 1>&2 |
758 |
- ((++ret)) |
759 |
- fi |
760 |
- else |
761 |
- vecho "doman: '${x}' is probably not a man page; skipping" 1>&2 |
762 |
- ((++ret)) |
763 |
- fi |
764 |
-done |
765 |
- |
766 |
-exit ${ret} |
767 |
|
768 |
Deleted: main/trunk/bin/domo |
769 |
=================================================================== |
770 |
--- main/trunk/bin/domo 2009-03-12 00:25:50 UTC (rev 13062) |
771 |
+++ main/trunk/bin/domo 2009-03-12 00:28:45 UTC (rev 13063) |
772 |
@@ -1,26 +0,0 @@ |
773 |
-#!/bin/bash |
774 |
-# Copyright 1999-2006 Gentoo Foundation |
775 |
-# Distributed under the terms of the GNU General Public License v2 |
776 |
-# $Id$ |
777 |
- |
778 |
-mynum=${#} |
779 |
-if [ ${mynum} -lt 1 ] ; then |
780 |
- echo "${0}: at least one argument needed" |
781 |
- exit 1 |
782 |
-fi |
783 |
-if [ ! -d "${D}${DESTTREE}/share/locale" ] ; then |
784 |
- install -d "${D}${DESTTREE}/share/locale/" |
785 |
-fi |
786 |
- |
787 |
-for x in "$@" ; do |
788 |
- if [ -e "${x}" ] ; then |
789 |
- mytiny="${x##*/}" |
790 |
- mydir="${D}${DESTTREE}/share/locale/${mytiny%.*}/LC_MESSAGES" |
791 |
- if [ ! -d "${mydir}" ] ; then |
792 |
- install -d "${mydir}" |
793 |
- fi |
794 |
- install -m0644 "${x}" "${mydir}/${MOPREFIX}.mo" |
795 |
- else |
796 |
- echo "!!! ${0##*/}: $x does not exist" 1>&2 |
797 |
- fi |
798 |
-done |
799 |
|
800 |
Deleted: main/trunk/bin/dosbin |
801 |
=================================================================== |
802 |
--- main/trunk/bin/dosbin 2009-03-12 00:25:50 UTC (rev 13062) |
803 |
+++ main/trunk/bin/dosbin 2009-03-12 00:28:45 UTC (rev 13063) |
804 |
@@ -1,27 +0,0 @@ |
805 |
-#!/bin/bash |
806 |
-# Copyright 1999-2006 Gentoo Foundation |
807 |
-# Distributed under the terms of the GNU General Public License v2 |
808 |
-# $Id$ |
809 |
- |
810 |
-if [[ $# -lt 1 ]] ; then |
811 |
- echo "$0: at least one argument needed" 1>&2 |
812 |
- exit 1 |
813 |
-fi |
814 |
- |
815 |
-if [[ ! -d ${D}${DESTTREE}/sbin ]] ; then |
816 |
- install -d "${D}${DESTTREE}/sbin" || exit 2 |
817 |
-fi |
818 |
- |
819 |
-ret=0 |
820 |
- |
821 |
-for x in "$@" ; do |
822 |
- if [[ -e ${x} ]] ; then |
823 |
- install -m0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/sbin" |
824 |
- else |
825 |
- echo "!!! ${0##*/}: ${x} does not exist" 1>&2 |
826 |
- false |
827 |
- fi |
828 |
- ((ret+=$?)) |
829 |
-done |
830 |
- |
831 |
-exit ${ret} |
832 |
|
833 |
Deleted: main/trunk/bin/dosed |
834 |
=================================================================== |
835 |
--- main/trunk/bin/dosed 2009-03-12 00:25:50 UTC (rev 13062) |
836 |
+++ main/trunk/bin/dosed 2009-03-12 00:28:45 UTC (rev 13063) |
837 |
@@ -1,36 +0,0 @@ |
838 |
-#!/bin/bash |
839 |
-# Copyright 1999-2006 Gentoo Foundation |
840 |
-# Distributed under the terms of the GNU General Public License v2 |
841 |
-# $Id$ |
842 |
- |
843 |
-if [[ $# -lt 1 ]] ; then |
844 |
- echo "!!! ${0##*/}: at least one argument needed" >&2 |
845 |
- exit 1 |
846 |
-fi |
847 |
- |
848 |
-ret=0 |
849 |
-file_found=0 |
850 |
-mysed="s:${D}::g" |
851 |
- |
852 |
-for x in "$@" ; do |
853 |
- y=$D${x#/} |
854 |
- if [ -e "${y}" ] ; then |
855 |
- if [ -f "${y}" ] ; then |
856 |
- file_found=1 |
857 |
- sed -i -e "${mysed}" "${y}" |
858 |
- else |
859 |
- echo "${y} is not a regular file!" >&2 |
860 |
- false |
861 |
- fi |
862 |
- ((ret+=$?)) |
863 |
- else |
864 |
- mysed="${x}" |
865 |
- fi |
866 |
-done |
867 |
- |
868 |
-if [ $file_found = 0 ] ; then |
869 |
- echo "!!! ${0##*/}: $y does not exist" 1>&2 |
870 |
- ((ret+=1)) |
871 |
-fi |
872 |
- |
873 |
-exit $ret |
874 |
|
875 |
Deleted: main/trunk/bin/dosym |
876 |
=================================================================== |
877 |
--- main/trunk/bin/dosym 2009-03-12 00:25:50 UTC (rev 13062) |
878 |
+++ main/trunk/bin/dosym 2009-03-12 00:28:45 UTC (rev 13063) |
879 |
@@ -1,14 +0,0 @@ |
880 |
-#!/bin/bash |
881 |
-# Copyright 1999-2006 Gentoo Foundation |
882 |
-# Distributed under the terms of the GNU General Public License v2 |
883 |
-# $Id$ |
884 |
- |
885 |
-if [[ $# -ne 2 ]] ; then |
886 |
- echo "$0: two arguments needed" 1>&2 |
887 |
- exit 1 |
888 |
-fi |
889 |
- |
890 |
-destdir=${2%/*} |
891 |
-[[ ! -d ${D}${destdir} ]] && dodir "${destdir}" |
892 |
- |
893 |
-exec ln -snf "$1" "${D}$2" |
894 |
|
895 |
Copied: main/trunk/bin/ebuild-helpers/dobin (from rev 13057, main/trunk/bin/dobin) |
896 |
=================================================================== |
897 |
--- main/trunk/bin/ebuild-helpers/dobin (rev 0) |
898 |
+++ main/trunk/bin/ebuild-helpers/dobin 2009-03-12 00:28:45 UTC (rev 13063) |
899 |
@@ -0,0 +1,29 @@ |
900 |
+#!/bin/bash |
901 |
+# Copyright 1999-2006 Gentoo Foundation |
902 |
+# Distributed under the terms of the GNU General Public License v2 |
903 |
+# $Id$ |
904 |
+ |
905 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
906 |
+ |
907 |
+if [[ $# -lt 1 ]] ; then |
908 |
+ vecho "$0: at least one argument needed" 1>&2 |
909 |
+ exit 1 |
910 |
+fi |
911 |
+ |
912 |
+if [[ ! -d ${D}${DESTTREE}/bin ]] ; then |
913 |
+ install -d "${D}${DESTTREE}/bin" || exit 2 |
914 |
+fi |
915 |
+ |
916 |
+ret=0 |
917 |
+ |
918 |
+for x in "$@" ; do |
919 |
+ if [[ -e ${x} ]] ; then |
920 |
+ install -m0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/bin" |
921 |
+ else |
922 |
+ echo "!!! ${0##*/}: $x does not exist" 1>&2 |
923 |
+ false |
924 |
+ fi |
925 |
+ ((ret+=$?)) |
926 |
+done |
927 |
+ |
928 |
+exit ${ret} |
929 |
|
930 |
Copied: main/trunk/bin/ebuild-helpers/doconfd (from rev 13057, main/trunk/bin/doconfd) |
931 |
=================================================================== |
932 |
--- main/trunk/bin/ebuild-helpers/doconfd (rev 0) |
933 |
+++ main/trunk/bin/ebuild-helpers/doconfd 2009-03-12 00:28:45 UTC (rev 13063) |
934 |
@@ -0,0 +1,14 @@ |
935 |
+#!/bin/bash |
936 |
+# Copyright 1999-2006 Gentoo Foundation |
937 |
+# Distributed under the terms of the GNU General Public License v2 |
938 |
+# $Id$ |
939 |
+ |
940 |
+if [[ $# -lt 1 ]] ; then |
941 |
+ echo "$0: at least one argument needed" 1>&2 |
942 |
+ exit 1 |
943 |
+fi |
944 |
+ |
945 |
+exec \ |
946 |
+env \ |
947 |
+INSDESTTREE="/etc/conf.d/" \ |
948 |
+doins "$@" |
949 |
|
950 |
Copied: main/trunk/bin/ebuild-helpers/dodir (from rev 13057, main/trunk/bin/dodir) |
951 |
=================================================================== |
952 |
--- main/trunk/bin/ebuild-helpers/dodir (rev 0) |
953 |
+++ main/trunk/bin/ebuild-helpers/dodir 2009-03-12 00:28:45 UTC (rev 13063) |
954 |
@@ -0,0 +1,6 @@ |
955 |
+#!/bin/bash |
956 |
+# Copyright 1999-2006 Gentoo Foundation |
957 |
+# Distributed under the terms of the GNU General Public License v2 |
958 |
+# $Id$ |
959 |
+ |
960 |
+exec install -d ${DIROPTIONS} "${@/#/${D}/}" |
961 |
|
962 |
Copied: main/trunk/bin/ebuild-helpers/dodoc (from rev 13057, main/trunk/bin/dodoc) |
963 |
=================================================================== |
964 |
--- main/trunk/bin/ebuild-helpers/dodoc (rev 0) |
965 |
+++ main/trunk/bin/ebuild-helpers/dodoc 2009-03-12 00:28:45 UTC (rev 13063) |
966 |
@@ -0,0 +1,28 @@ |
967 |
+#!/bin/bash |
968 |
+# Copyright 1999-2007 Gentoo Foundation |
969 |
+# Distributed under the terms of the GNU General Public License v2 |
970 |
+# $Id$ |
971 |
+ |
972 |
+if [ $# -lt 1 ] ; then |
973 |
+ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
974 |
+ vecho "${0##*/}: at least one argument needed" 1>&2 |
975 |
+ exit 1 |
976 |
+fi |
977 |
+ |
978 |
+dir="${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" |
979 |
+if [ ! -d "${dir}" ] ; then |
980 |
+ install -d "${dir}" |
981 |
+fi |
982 |
+ |
983 |
+ret=0 |
984 |
+for x in "$@" ; do |
985 |
+ if [ -s "${x}" ] ; then |
986 |
+ install -m0644 "${x}" "${dir}" |
987 |
+ ecompress --queue "${dir}/${x##*/}" |
988 |
+ elif [ ! -e "${x}" ] ; then |
989 |
+ echo "!!! ${0##*/}: $x does not exist" 1>&2 |
990 |
+ ((++ret)) |
991 |
+ fi |
992 |
+done |
993 |
+ |
994 |
+exit ${ret} |
995 |
|
996 |
Copied: main/trunk/bin/ebuild-helpers/doenvd (from rev 13057, main/trunk/bin/doenvd) |
997 |
=================================================================== |
998 |
--- main/trunk/bin/ebuild-helpers/doenvd (rev 0) |
999 |
+++ main/trunk/bin/ebuild-helpers/doenvd 2009-03-12 00:28:45 UTC (rev 13063) |
1000 |
@@ -0,0 +1,14 @@ |
1001 |
+#!/bin/bash |
1002 |
+# Copyright 1999-2006 Gentoo Foundation |
1003 |
+# Distributed under the terms of the GNU General Public License v2 |
1004 |
+# $Id$ |
1005 |
+ |
1006 |
+if [[ $# -lt 1 ]] ; then |
1007 |
+ echo "$0: at least one argument needed" 1>&2 |
1008 |
+ exit 1 |
1009 |
+fi |
1010 |
+ |
1011 |
+exec \ |
1012 |
+env \ |
1013 |
+INSDESTTREE="/etc/env.d/" \ |
1014 |
+doins "$@" |
1015 |
|
1016 |
Copied: main/trunk/bin/ebuild-helpers/doexe (from rev 13057, main/trunk/bin/doexe) |
1017 |
=================================================================== |
1018 |
--- main/trunk/bin/ebuild-helpers/doexe (rev 0) |
1019 |
+++ main/trunk/bin/ebuild-helpers/doexe 2009-03-12 00:28:45 UTC (rev 13063) |
1020 |
@@ -0,0 +1,29 @@ |
1021 |
+#!/bin/bash |
1022 |
+# Copyright 1999-2007 Gentoo Foundation |
1023 |
+# Distributed under the terms of the GNU General Public License v2 |
1024 |
+# $Id$ |
1025 |
+ |
1026 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
1027 |
+ |
1028 |
+if [[ $# -lt 1 ]] ; then |
1029 |
+ echo "$0: at least one argument needed" 1>&2 |
1030 |
+ exit 1 |
1031 |
+fi |
1032 |
+ |
1033 |
+if [[ ! -d ${D}${_E_EXEDESTTREE_} ]] ; then |
1034 |
+ install -d "${D}${_E_EXEDESTTREE_}" |
1035 |
+fi |
1036 |
+ |
1037 |
+for x in "$@" ; do |
1038 |
+ if [ -L "${x}" ] ; then |
1039 |
+ cp "${x}" "${T}" |
1040 |
+ mysrc="${T}"/$(/usr/bin/basename "${x}") |
1041 |
+ elif [ -d "${x}" ] ; then |
1042 |
+ vecho "doexe: warning, skipping directory ${x}" |
1043 |
+ continue |
1044 |
+ else |
1045 |
+ mysrc="${x}" |
1046 |
+ fi |
1047 |
+ install $EXEOPTIONS "$mysrc" "$D$_E_EXEDESTTREE_" || \ |
1048 |
+ echo "!!! ${0##*/}: $mysrc does not exist" 1>&2 |
1049 |
+done |
1050 |
|
1051 |
Copied: main/trunk/bin/ebuild-helpers/dohard (from rev 13057, main/trunk/bin/dohard) |
1052 |
=================================================================== |
1053 |
--- main/trunk/bin/ebuild-helpers/dohard (rev 0) |
1054 |
+++ main/trunk/bin/ebuild-helpers/dohard 2009-03-12 00:28:45 UTC (rev 13063) |
1055 |
@@ -0,0 +1,14 @@ |
1056 |
+#!/bin/bash |
1057 |
+# Copyright 1999-2007 Gentoo Foundation |
1058 |
+# Distributed under the terms of the GNU General Public License v2 |
1059 |
+# $Id$ |
1060 |
+ |
1061 |
+if [[ $# -ne 2 ]] ; then |
1062 |
+ echo "$0: two arguments needed" 1>&2 |
1063 |
+ exit 1 |
1064 |
+fi |
1065 |
+ |
1066 |
+destdir=${2%/*} |
1067 |
+[[ ! -d ${D}${destdir} ]] && dodir "${destdir}" |
1068 |
+ |
1069 |
+exec ln -f "${D}$1" "${D}$2" |
1070 |
|
1071 |
Copied: main/trunk/bin/ebuild-helpers/dohtml (from rev 13057, main/trunk/bin/dohtml) |
1072 |
=================================================================== |
1073 |
--- main/trunk/bin/ebuild-helpers/dohtml (rev 0) |
1074 |
+++ main/trunk/bin/ebuild-helpers/dohtml 2009-03-12 00:28:45 UTC (rev 13063) |
1075 |
@@ -0,0 +1,186 @@ |
1076 |
+#!/usr/bin/python |
1077 |
+# Copyright 1999-2006 Gentoo Foundation |
1078 |
+# Distributed under the terms of the GNU General Public License v2 |
1079 |
+# $Id$ |
1080 |
+ |
1081 |
+# |
1082 |
+# Typical usage: |
1083 |
+# dohtml -r docs/* |
1084 |
+# - put all files and directories in docs into /usr/share/doc/${PF}/html |
1085 |
+# dohtml foo.html |
1086 |
+# - put foo.html into /usr/share/doc/${PF}/html |
1087 |
+# |
1088 |
+# |
1089 |
+# Detailed usage: |
1090 |
+# dohtml <list-of-files> |
1091 |
+# - will install the files in the list of files (space-separated list) into |
1092 |
+# /usr/share/doc/${PF}/html, provided the file ends in .htm, .html, .css, |
1093 |
+# .js, ,gif, .jpeg, .jpg, or .png. |
1094 |
+# dohtml -r <list-of-files-and-directories> |
1095 |
+# - will do as 'dohtml', but recurse into all directories, as long as the |
1096 |
+# directory name is not CVS |
1097 |
+# dohtml -A jpe,java [-r] <list-of-files[-and-directories]> |
1098 |
+# - will do as 'dohtml' but add .jpe,.java (default filter list is |
1099 |
+# added to your list) |
1100 |
+# dohtml -a png,gif,html,htm [-r] <list-of-files[-and-directories]> |
1101 |
+# - will do as 'dohtml' but filter on .png,.gif,.html,.htm (default filter |
1102 |
+# list is ignored) |
1103 |
+# dohtml -x CVS,SCCS,RCS -r <list-of-files-and-directories> |
1104 |
+# - will do as 'dohtml -r', but ignore directories named CVS, SCCS, RCS |
1105 |
+# |
1106 |
+ |
1107 |
+import os |
1108 |
+import sys |
1109 |
+ |
1110 |
+def dodir(path): |
1111 |
+ os.spawnlp(os.P_WAIT, "install", "install", "-d", path) |
1112 |
+ |
1113 |
+def dofile(src,dst): |
1114 |
+ os.spawnlp(os.P_WAIT, "install", "install", "-m0644", src, dst) |
1115 |
+ |
1116 |
+def eqawarn(lines): |
1117 |
+ cmd = "source '%s/isolated-functions.sh' ; " % \ |
1118 |
+ os.environ["PORTAGE_BIN_PATH"] |
1119 |
+ for line in lines: |
1120 |
+ cmd += "eqawarn \"%s\" ; " % line |
1121 |
+ os.spawnlp(os.P_WAIT, "bash", "bash", "-c", cmd) |
1122 |
+ |
1123 |
+skipped_directories = [] |
1124 |
+ |
1125 |
+def install(basename, dirname, options, prefix=""): |
1126 |
+ fullpath = basename |
1127 |
+ if prefix: |
1128 |
+ fullpath = prefix + "/" + fullpath |
1129 |
+ if dirname: |
1130 |
+ fullpath = dirname + "/" + fullpath |
1131 |
+ |
1132 |
+ if options.DOCDESTTREE: |
1133 |
+ destdir = options.D + "usr/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix |
1134 |
+ else: |
1135 |
+ destdir = options.D + "usr/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix |
1136 |
+ |
1137 |
+ if os.path.isfile(fullpath): |
1138 |
+ ext = os.path.splitext(basename)[1] |
1139 |
+ if (len(ext) and ext[1:] in options.allowed_exts) or basename in options.allowed_files: |
1140 |
+ dodir(destdir) |
1141 |
+ dofile(fullpath, destdir + "/" + basename) |
1142 |
+ elif options.recurse and os.path.isdir(fullpath) and \ |
1143 |
+ basename not in options.disallowed_dirs: |
1144 |
+ for i in os.listdir(fullpath): |
1145 |
+ pfx = basename |
1146 |
+ if prefix: pfx = prefix + "/" + pfx |
1147 |
+ install(i, dirname, options, pfx) |
1148 |
+ elif not options.recurse and os.path.isdir(fullpath): |
1149 |
+ global skipped_directories |
1150 |
+ skipped_directories.append(fullpath) |
1151 |
+ return False |
1152 |
+ else: |
1153 |
+ return False |
1154 |
+ return True |
1155 |
+ |
1156 |
+ |
1157 |
+class OptionsClass: |
1158 |
+ def __init__(self): |
1159 |
+ self.PF = "" |
1160 |
+ self.D = "" |
1161 |
+ self.DOCDESTTREE = "" |
1162 |
+ |
1163 |
+ if "PF" in os.environ: |
1164 |
+ self.PF = os.environ["PF"] |
1165 |
+ if "D" in os.environ: |
1166 |
+ self.D = os.environ["D"] |
1167 |
+ if "_E_DOCDESTTREE_" in os.environ: |
1168 |
+ self.DOCDESTTREE = os.environ["_E_DOCDESTTREE_"] |
1169 |
+ |
1170 |
+ self.allowed_exts = [ 'htm', 'html', 'css', 'js', |
1171 |
+ 'gif', 'jpeg', 'jpg', 'png' ] |
1172 |
+ self.allowed_files = [] |
1173 |
+ self.disallowed_dirs = [ 'CVS' ] |
1174 |
+ self.recurse = False |
1175 |
+ self.verbose = False |
1176 |
+ self.doc_prefix = "" |
1177 |
+ |
1178 |
+def print_help(): |
1179 |
+ opts = OptionsClass() |
1180 |
+ |
1181 |
+ print "dohtml [-a .foo,.bar] [-A .foo,.bar] [-f foo,bar] [-x foo,bar]" |
1182 |
+ print " [-r] [-V] <file> [file ...]" |
1183 |
+ print |
1184 |
+ print " -a Set the list of allowed to those that are specified." |
1185 |
+ print " Default:", ",".join(opts.allowed_exts) |
1186 |
+ print " -A Extend the list of allowed file types." |
1187 |
+ print " -f Set list of allowed extensionless file names." |
1188 |
+ print " -x Set directories to be excluded from recursion." |
1189 |
+ print " Default:", ",".join(opts.disallowed_dirs) |
1190 |
+ print " -p Set a document prefix for installed files (empty by default)." |
1191 |
+ print " -r Install files and directories recursively." |
1192 |
+ print " -V Be verbose." |
1193 |
+ print |
1194 |
+ |
1195 |
+def parse_args(): |
1196 |
+ options = OptionsClass() |
1197 |
+ args = [] |
1198 |
+ |
1199 |
+ x = 1 |
1200 |
+ while x < len(sys.argv): |
1201 |
+ arg = sys.argv[x] |
1202 |
+ if arg in ["-h","-r","-V"]: |
1203 |
+ if arg == "-h": |
1204 |
+ print_help() |
1205 |
+ sys.exit(0) |
1206 |
+ elif arg == "-r": |
1207 |
+ options.recurse = True |
1208 |
+ elif arg == "-V": |
1209 |
+ options.verbose = True |
1210 |
+ elif sys.argv[x] in ["-A","-a","-f","-x","-p"]: |
1211 |
+ x += 1 |
1212 |
+ if x == len(sys.argv): |
1213 |
+ print_help() |
1214 |
+ sys.exit(0) |
1215 |
+ elif arg == "-p": |
1216 |
+ options.doc_prefix = sys.argv[x] |
1217 |
+ else: |
1218 |
+ values = sys.argv[x].split(",") |
1219 |
+ if arg == "-A": |
1220 |
+ options.allowed_exts.extend(values) |
1221 |
+ elif arg == "-a": |
1222 |
+ options.allowed_exts = values |
1223 |
+ elif arg == "-f": |
1224 |
+ options.allowed_files = values |
1225 |
+ elif arg == "-x": |
1226 |
+ options.disallowed_dirs = values |
1227 |
+ else: |
1228 |
+ args.append(sys.argv[x]) |
1229 |
+ x += 1 |
1230 |
+ |
1231 |
+ return (options, args) |
1232 |
+ |
1233 |
+def main(): |
1234 |
+ |
1235 |
+ (options, args) = parse_args() |
1236 |
+ |
1237 |
+ if options.verbose: |
1238 |
+ print "Allowed extensions:", options.allowed_exts |
1239 |
+ print "Document prefix : '" + options.doc_prefix + "'" |
1240 |
+ print "Allowed files :", options.allowed_files |
1241 |
+ |
1242 |
+ success = False |
1243 |
+ |
1244 |
+ for x in args: |
1245 |
+ basename = os.path.basename(x) |
1246 |
+ dirname = os.path.dirname(x) |
1247 |
+ success |= install(basename, dirname, options) |
1248 |
+ |
1249 |
+ if success: |
1250 |
+ retcode = 0 |
1251 |
+ else: |
1252 |
+ retcode = 1 |
1253 |
+ global skipped_directories |
1254 |
+ for x in skipped_directories: |
1255 |
+ eqawarn(["QA Notice: dohtml on directory " + \ |
1256 |
+ "'%s' without recursion option" % x]) |
1257 |
+ |
1258 |
+ sys.exit(retcode) |
1259 |
+ |
1260 |
+if __name__ == "__main__": |
1261 |
+ main() |
1262 |
|
1263 |
Copied: main/trunk/bin/ebuild-helpers/doinfo (from rev 13057, main/trunk/bin/doinfo) |
1264 |
=================================================================== |
1265 |
--- main/trunk/bin/ebuild-helpers/doinfo (rev 0) |
1266 |
+++ main/trunk/bin/ebuild-helpers/doinfo 2009-03-12 00:28:45 UTC (rev 13063) |
1267 |
@@ -0,0 +1,22 @@ |
1268 |
+#!/bin/bash |
1269 |
+# Copyright 1999-2007 Gentoo Foundation |
1270 |
+# Distributed under the terms of the GNU General Public License v2 |
1271 |
+# $Id$ |
1272 |
+ |
1273 |
+if [[ -z $1 ]] ; then |
1274 |
+ vecho "${0##*/}: at least one argument needed" |
1275 |
+ exit 1 |
1276 |
+fi |
1277 |
+ |
1278 |
+if [[ ! -d ${D}usr/share/info ]] ; then |
1279 |
+ install -d "${D}usr/share/info" || exit 1 |
1280 |
+fi |
1281 |
+ |
1282 |
+install -m0644 "$@" "${D}usr/share/info" |
1283 |
+rval=$? |
1284 |
+if [ $rval -ne 0 ] ; then |
1285 |
+ for x in "$@" ; do |
1286 |
+ [ -e "$x" ] || echo "!!! ${0##*/}: $x does not exist" 1>&2 |
1287 |
+ done |
1288 |
+fi |
1289 |
+exit $rval |
1290 |
|
1291 |
Copied: main/trunk/bin/ebuild-helpers/doinitd (from rev 13057, main/trunk/bin/doinitd) |
1292 |
=================================================================== |
1293 |
--- main/trunk/bin/ebuild-helpers/doinitd (rev 0) |
1294 |
+++ main/trunk/bin/ebuild-helpers/doinitd 2009-03-12 00:28:45 UTC (rev 13063) |
1295 |
@@ -0,0 +1,14 @@ |
1296 |
+#!/bin/bash |
1297 |
+# Copyright 1999-2007 Gentoo Foundation |
1298 |
+# Distributed under the terms of the GNU General Public License v2 |
1299 |
+# $Id$ |
1300 |
+ |
1301 |
+if [[ $# -lt 1 ]] ; then |
1302 |
+ echo "$0: at least one argument needed" 1>&2 |
1303 |
+ exit 1 |
1304 |
+fi |
1305 |
+ |
1306 |
+exec \ |
1307 |
+env \ |
1308 |
+_E_EXEDESTTREE_="/etc/init.d/" \ |
1309 |
+doexe "$@" |
1310 |
|
1311 |
Copied: main/trunk/bin/ebuild-helpers/doins (from rev 13057, main/trunk/bin/doins) |
1312 |
=================================================================== |
1313 |
--- main/trunk/bin/ebuild-helpers/doins (rev 0) |
1314 |
+++ main/trunk/bin/ebuild-helpers/doins 2009-03-12 00:28:45 UTC (rev 13063) |
1315 |
@@ -0,0 +1,98 @@ |
1316 |
+#!/bin/bash |
1317 |
+# Copyright 1999-2007 Gentoo Foundation |
1318 |
+# Distributed under the terms of the GNU General Public License v2 |
1319 |
+# $Id$ |
1320 |
+ |
1321 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
1322 |
+ |
1323 |
+if [ $# -lt 1 ] ; then |
1324 |
+ echo "${0##*/}: at least one argument needed" 1>&2 |
1325 |
+ exit 1 |
1326 |
+fi |
1327 |
+ |
1328 |
+if [[ "$1" == "-r" ]] ; then |
1329 |
+ DOINSRECUR=y |
1330 |
+ shift |
1331 |
+else |
1332 |
+ DOINSRECUR=n |
1333 |
+fi |
1334 |
+ |
1335 |
+if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then |
1336 |
+ vecho "-------------------------------------------------------" 1>&2 |
1337 |
+ vecho "You should not use \${D} with helpers." 1>&2 |
1338 |
+ vecho " --> ${INSDESTTREE}" 1>&2 |
1339 |
+ vecho "-------------------------------------------------------" 1>&2 |
1340 |
+ exit 1 |
1341 |
+fi |
1342 |
+ |
1343 |
+export TMP=$T/.doins_tmp |
1344 |
+# Use separate directories to avoid potential name collisions. |
1345 |
+mkdir -p "$TMP"/{1,2} |
1346 |
+ |
1347 |
+[[ ! -d ${D}${INSDESTTREE} ]] && dodir "${INSDESTTREE}" |
1348 |
+ |
1349 |
+_doins() { |
1350 |
+ local mysrc="$1" mydir="$2" cleanup="" rval |
1351 |
+ |
1352 |
+ if [ -L "$mysrc" ] ; then |
1353 |
+ cp "$mysrc" "$TMP/2" |
1354 |
+ mysrc="$TMP/2/${mysrc##*/}" |
1355 |
+ cleanup=${mysrc} |
1356 |
+ fi |
1357 |
+ |
1358 |
+ install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}/${mydir}" |
1359 |
+ rval=$? |
1360 |
+ [[ -n ${cleanup} ]] && rm -f "${cleanup}" |
1361 |
+ [ $rval -ne 0 ] && echo "!!! ${0##*/}: $mysrc does not exist" 1>&2 |
1362 |
+ return $rval |
1363 |
+} |
1364 |
+ |
1365 |
+_xdoins() { |
1366 |
+ while read -d $'\0' x ; do |
1367 |
+ _doins "$x" "${x%/*}" |
1368 |
+ done |
1369 |
+} |
1370 |
+ |
1371 |
+success=0 |
1372 |
+ |
1373 |
+for x in "$@" ; do |
1374 |
+ if [ -d "$x" ] ; then |
1375 |
+ if [ "${DOINSRECUR}" == "n" ] ; then |
1376 |
+ continue |
1377 |
+ fi |
1378 |
+ |
1379 |
+ while [ "$x" != "${x%/}" ] ; do |
1380 |
+ x=${x%/} |
1381 |
+ done |
1382 |
+ if [ "$x" = "${x%/*}" ] ; then |
1383 |
+ pushd "$PWD" >/dev/null |
1384 |
+ else |
1385 |
+ pushd "${x%/*}" >/dev/null |
1386 |
+ fi |
1387 |
+ x=${x##*/} |
1388 |
+ x_orig=$x |
1389 |
+ # Follow any symlinks recursively until we've got |
1390 |
+ # a normal directory for 'find' to traverse. |
1391 |
+ while [ -L "$x" ] ; do |
1392 |
+ pushd "$(readlink "$x")" >/dev/null |
1393 |
+ x=${PWD##*/} |
1394 |
+ pushd "${PWD%/*}" >/dev/null |
1395 |
+ done |
1396 |
+ if [[ $x != $x_orig ]] ; then |
1397 |
+ mv "$x" "$TMP/1/$x_orig" |
1398 |
+ pushd "$TMP/1" >/dev/null |
1399 |
+ fi |
1400 |
+ find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \; |
1401 |
+ find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins |
1402 |
+ if [[ $x != $x_orig ]] ; then |
1403 |
+ popd >/dev/null |
1404 |
+ mv "$TMP/1/$x_orig" "$x" |
1405 |
+ fi |
1406 |
+ while popd >/dev/null 2>&1 ; do true ; done |
1407 |
+ ((++success)) |
1408 |
+ else |
1409 |
+ _doins "${x}" && ((++success)) |
1410 |
+ fi |
1411 |
+done |
1412 |
+rm -rf "$TMP" |
1413 |
+[ $success -gt 0 ] && exit 0 || exit 1 |
1414 |
|
1415 |
Copied: main/trunk/bin/ebuild-helpers/dolib (from rev 13057, main/trunk/bin/dolib) |
1416 |
=================================================================== |
1417 |
--- main/trunk/bin/ebuild-helpers/dolib (rev 0) |
1418 |
+++ main/trunk/bin/ebuild-helpers/dolib 2009-03-12 00:28:45 UTC (rev 13063) |
1419 |
@@ -0,0 +1,41 @@ |
1420 |
+#!/bin/bash |
1421 |
+# Copyright 1999-2006 Gentoo Foundation |
1422 |
+# Distributed under the terms of the GNU General Public License v2 |
1423 |
+# $Id$ |
1424 |
+ |
1425 |
+# Setup ABI cruft |
1426 |
+LIBDIR_VAR="LIBDIR_${ABI}" |
1427 |
+if [[ -n ${ABI} && -n ${!LIBDIR_VAR} ]] ; then |
1428 |
+ CONF_LIBDIR=${!LIBDIR_VAR} |
1429 |
+fi |
1430 |
+unset LIBDIR_VAR |
1431 |
+# we need this to default to lib so that things dont break |
1432 |
+CONF_LIBDIR=${CONF_LIBDIR:-lib} |
1433 |
+libdir="${D}${DESTTREE}/${CONF_LIBDIR}" |
1434 |
+ |
1435 |
+ |
1436 |
+if [[ $# -lt 1 ]] ; then |
1437 |
+ echo "$0: at least one argument needed" 1>&2 |
1438 |
+ exit 1 |
1439 |
+fi |
1440 |
+if [[ ! -d ${libdir} ]] ; then |
1441 |
+ install -d "${libdir}" || exit 1 |
1442 |
+fi |
1443 |
+ |
1444 |
+ret=0 |
1445 |
+ |
1446 |
+for x in "$@" ; do |
1447 |
+ if [[ -e ${x} ]] ; then |
1448 |
+ if [[ ! -L ${x} ]] ; then |
1449 |
+ install ${LIBOPTIONS} "${x}" "${libdir}" |
1450 |
+ else |
1451 |
+ ln -s "$(readlink "${x}")" "${libdir}/${x##*/}" |
1452 |
+ fi |
1453 |
+ else |
1454 |
+ echo "!!! ${0##*/}: ${x} does not exist" 1>&2 |
1455 |
+ false |
1456 |
+ fi |
1457 |
+ ((ret+=$?)) |
1458 |
+done |
1459 |
+ |
1460 |
+exit ${ret} |
1461 |
|
1462 |
Copied: main/trunk/bin/ebuild-helpers/dolib.a (from rev 13057, main/trunk/bin/dolib.a) |
1463 |
=================================================================== |
1464 |
--- main/trunk/bin/ebuild-helpers/dolib.a (rev 0) |
1465 |
+++ main/trunk/bin/ebuild-helpers/dolib.a 2009-03-12 00:28:45 UTC (rev 13063) |
1466 |
@@ -0,0 +1,7 @@ |
1467 |
+#!/bin/bash |
1468 |
+# Copyright 1999-2006 Gentoo Foundation |
1469 |
+# Distributed under the terms of the GNU General Public License v2 |
1470 |
+# $Id$ |
1471 |
+ |
1472 |
+exec env LIBOPTIONS="-m0644" \ |
1473 |
+ dolib "$@" |
1474 |
|
1475 |
Copied: main/trunk/bin/ebuild-helpers/dolib.so (from rev 13057, main/trunk/bin/dolib.so) |
1476 |
=================================================================== |
1477 |
--- main/trunk/bin/ebuild-helpers/dolib.so (rev 0) |
1478 |
+++ main/trunk/bin/ebuild-helpers/dolib.so 2009-03-12 00:28:45 UTC (rev 13063) |
1479 |
@@ -0,0 +1,7 @@ |
1480 |
+#!/bin/bash |
1481 |
+# Copyright 1999-2006 Gentoo Foundation |
1482 |
+# Distributed under the terms of the GNU General Public License v2 |
1483 |
+# $Id$ |
1484 |
+ |
1485 |
+exec env LIBOPTIONS="-m0755" \ |
1486 |
+ dolib "$@" |
1487 |
|
1488 |
Copied: main/trunk/bin/ebuild-helpers/doman (from rev 13057, main/trunk/bin/doman) |
1489 |
=================================================================== |
1490 |
--- main/trunk/bin/ebuild-helpers/doman (rev 0) |
1491 |
+++ main/trunk/bin/ebuild-helpers/doman 2009-03-12 00:28:45 UTC (rev 13063) |
1492 |
@@ -0,0 +1,62 @@ |
1493 |
+#!/bin/bash |
1494 |
+# Copyright 1999-2006 Gentoo Foundation |
1495 |
+# Distributed under the terms of the GNU General Public License v2 |
1496 |
+# $Id$ |
1497 |
+ |
1498 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
1499 |
+ |
1500 |
+if [[ $# -lt 1 ]] ; then |
1501 |
+ echo "$0: at least one argument needed" 1>&2 |
1502 |
+ exit 1 |
1503 |
+fi |
1504 |
+ |
1505 |
+i18n="" |
1506 |
+ |
1507 |
+ret=0 |
1508 |
+ |
1509 |
+for x in "$@" ; do |
1510 |
+ if [[ ${x:0:6} == "-i18n=" ]] ; then |
1511 |
+ i18n=${x:6}/ |
1512 |
+ continue |
1513 |
+ fi |
1514 |
+ if [[ ${x:0:6} == ".keep_" ]] ; then |
1515 |
+ continue |
1516 |
+ fi |
1517 |
+ |
1518 |
+ suffix=${x##*.} |
1519 |
+ |
1520 |
+ # These will be automatically decompressed by ecompressdir. |
1521 |
+ if hasq ${suffix} Z gz bz2 ; then |
1522 |
+ realname=${x%.*} |
1523 |
+ suffix=${realname##*.} |
1524 |
+ fi |
1525 |
+ |
1526 |
+ if ! hasq "${EAPI:-0}" 0 1 && \ |
1527 |
+ [[ $x =~ (.*)\.([a-z][a-z](_[A-Z][A-Z])?)\.(.*) ]] ; then |
1528 |
+ name=${BASH_REMATCH[1]##*/}.${BASH_REMATCH[4]} |
1529 |
+ mandir=${BASH_REMATCH[2]}/man${suffix:0:1} |
1530 |
+ else |
1531 |
+ name=${x##*/} |
1532 |
+ mandir=${i18n}man${suffix:0:1} |
1533 |
+ fi |
1534 |
+ |
1535 |
+ |
1536 |
+ if [[ ${mandir} =~ man[0-9n](f|p|pm)?$ ]] ; then |
1537 |
+ if [[ -s ${x} ]] ; then |
1538 |
+ if [[ ! -d ${D}/usr/share/man/${mandir} ]] ; then |
1539 |
+ install -d "${D}/usr/share/man/${mandir}" |
1540 |
+ fi |
1541 |
+ |
1542 |
+ install -m0644 "${x}" "${D}/usr/share/man/${mandir}/${name}" |
1543 |
+ ((ret+=$?)) |
1544 |
+ elif [[ ! -e ${x} ]] ; then |
1545 |
+ echo "!!! ${0##*/}: $x does not exist" 1>&2 |
1546 |
+ ((++ret)) |
1547 |
+ fi |
1548 |
+ else |
1549 |
+ vecho "doman: '${x}' is probably not a man page; skipping" 1>&2 |
1550 |
+ ((++ret)) |
1551 |
+ fi |
1552 |
+done |
1553 |
+ |
1554 |
+exit ${ret} |
1555 |
|
1556 |
Copied: main/trunk/bin/ebuild-helpers/domo (from rev 13057, main/trunk/bin/domo) |
1557 |
=================================================================== |
1558 |
--- main/trunk/bin/ebuild-helpers/domo (rev 0) |
1559 |
+++ main/trunk/bin/ebuild-helpers/domo 2009-03-12 00:28:45 UTC (rev 13063) |
1560 |
@@ -0,0 +1,26 @@ |
1561 |
+#!/bin/bash |
1562 |
+# Copyright 1999-2006 Gentoo Foundation |
1563 |
+# Distributed under the terms of the GNU General Public License v2 |
1564 |
+# $Id$ |
1565 |
+ |
1566 |
+mynum=${#} |
1567 |
+if [ ${mynum} -lt 1 ] ; then |
1568 |
+ echo "${0}: at least one argument needed" |
1569 |
+ exit 1 |
1570 |
+fi |
1571 |
+if [ ! -d "${D}${DESTTREE}/share/locale" ] ; then |
1572 |
+ install -d "${D}${DESTTREE}/share/locale/" |
1573 |
+fi |
1574 |
+ |
1575 |
+for x in "$@" ; do |
1576 |
+ if [ -e "${x}" ] ; then |
1577 |
+ mytiny="${x##*/}" |
1578 |
+ mydir="${D}${DESTTREE}/share/locale/${mytiny%.*}/LC_MESSAGES" |
1579 |
+ if [ ! -d "${mydir}" ] ; then |
1580 |
+ install -d "${mydir}" |
1581 |
+ fi |
1582 |
+ install -m0644 "${x}" "${mydir}/${MOPREFIX}.mo" |
1583 |
+ else |
1584 |
+ echo "!!! ${0##*/}: $x does not exist" 1>&2 |
1585 |
+ fi |
1586 |
+done |
1587 |
|
1588 |
Copied: main/trunk/bin/ebuild-helpers/dosbin (from rev 13057, main/trunk/bin/dosbin) |
1589 |
=================================================================== |
1590 |
--- main/trunk/bin/ebuild-helpers/dosbin (rev 0) |
1591 |
+++ main/trunk/bin/ebuild-helpers/dosbin 2009-03-12 00:28:45 UTC (rev 13063) |
1592 |
@@ -0,0 +1,27 @@ |
1593 |
+#!/bin/bash |
1594 |
+# Copyright 1999-2006 Gentoo Foundation |
1595 |
+# Distributed under the terms of the GNU General Public License v2 |
1596 |
+# $Id$ |
1597 |
+ |
1598 |
+if [[ $# -lt 1 ]] ; then |
1599 |
+ echo "$0: at least one argument needed" 1>&2 |
1600 |
+ exit 1 |
1601 |
+fi |
1602 |
+ |
1603 |
+if [[ ! -d ${D}${DESTTREE}/sbin ]] ; then |
1604 |
+ install -d "${D}${DESTTREE}/sbin" || exit 2 |
1605 |
+fi |
1606 |
+ |
1607 |
+ret=0 |
1608 |
+ |
1609 |
+for x in "$@" ; do |
1610 |
+ if [[ -e ${x} ]] ; then |
1611 |
+ install -m0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/sbin" |
1612 |
+ else |
1613 |
+ echo "!!! ${0##*/}: ${x} does not exist" 1>&2 |
1614 |
+ false |
1615 |
+ fi |
1616 |
+ ((ret+=$?)) |
1617 |
+done |
1618 |
+ |
1619 |
+exit ${ret} |
1620 |
|
1621 |
Copied: main/trunk/bin/ebuild-helpers/dosed (from rev 13057, main/trunk/bin/dosed) |
1622 |
=================================================================== |
1623 |
--- main/trunk/bin/ebuild-helpers/dosed (rev 0) |
1624 |
+++ main/trunk/bin/ebuild-helpers/dosed 2009-03-12 00:28:45 UTC (rev 13063) |
1625 |
@@ -0,0 +1,36 @@ |
1626 |
+#!/bin/bash |
1627 |
+# Copyright 1999-2006 Gentoo Foundation |
1628 |
+# Distributed under the terms of the GNU General Public License v2 |
1629 |
+# $Id$ |
1630 |
+ |
1631 |
+if [[ $# -lt 1 ]] ; then |
1632 |
+ echo "!!! ${0##*/}: at least one argument needed" >&2 |
1633 |
+ exit 1 |
1634 |
+fi |
1635 |
+ |
1636 |
+ret=0 |
1637 |
+file_found=0 |
1638 |
+mysed="s:${D}::g" |
1639 |
+ |
1640 |
+for x in "$@" ; do |
1641 |
+ y=$D${x#/} |
1642 |
+ if [ -e "${y}" ] ; then |
1643 |
+ if [ -f "${y}" ] ; then |
1644 |
+ file_found=1 |
1645 |
+ sed -i -e "${mysed}" "${y}" |
1646 |
+ else |
1647 |
+ echo "${y} is not a regular file!" >&2 |
1648 |
+ false |
1649 |
+ fi |
1650 |
+ ((ret+=$?)) |
1651 |
+ else |
1652 |
+ mysed="${x}" |
1653 |
+ fi |
1654 |
+done |
1655 |
+ |
1656 |
+if [ $file_found = 0 ] ; then |
1657 |
+ echo "!!! ${0##*/}: $y does not exist" 1>&2 |
1658 |
+ ((ret+=1)) |
1659 |
+fi |
1660 |
+ |
1661 |
+exit $ret |
1662 |
|
1663 |
Copied: main/trunk/bin/ebuild-helpers/dosym (from rev 13057, main/trunk/bin/dosym) |
1664 |
=================================================================== |
1665 |
--- main/trunk/bin/ebuild-helpers/dosym (rev 0) |
1666 |
+++ main/trunk/bin/ebuild-helpers/dosym 2009-03-12 00:28:45 UTC (rev 13063) |
1667 |
@@ -0,0 +1,14 @@ |
1668 |
+#!/bin/bash |
1669 |
+# Copyright 1999-2006 Gentoo Foundation |
1670 |
+# Distributed under the terms of the GNU General Public License v2 |
1671 |
+# $Id$ |
1672 |
+ |
1673 |
+if [[ $# -ne 2 ]] ; then |
1674 |
+ echo "$0: two arguments needed" 1>&2 |
1675 |
+ exit 1 |
1676 |
+fi |
1677 |
+ |
1678 |
+destdir=${2%/*} |
1679 |
+[[ ! -d ${D}${destdir} ]] && dodir "${destdir}" |
1680 |
+ |
1681 |
+exec ln -snf "$1" "${D}$2" |
1682 |
|
1683 |
Copied: main/trunk/bin/ebuild-helpers/ecompress (from rev 13057, main/trunk/bin/ecompress) |
1684 |
=================================================================== |
1685 |
--- main/trunk/bin/ebuild-helpers/ecompress (rev 0) |
1686 |
+++ main/trunk/bin/ebuild-helpers/ecompress 2009-03-12 00:28:45 UTC (rev 13063) |
1687 |
@@ -0,0 +1,92 @@ |
1688 |
+#!/bin/bash |
1689 |
+# Copyright 1999-2007 Gentoo Foundation |
1690 |
+# Distributed under the terms of the GNU General Public License v2 |
1691 |
+# $Id$ |
1692 |
+ |
1693 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
1694 |
+ |
1695 |
+if [[ -z $1 ]] ; then |
1696 |
+ vecho "${0##*/}: at least one argument needed" 1>&2 |
1697 |
+ exit 1 |
1698 |
+fi |
1699 |
+ |
1700 |
+# setup compression stuff |
1701 |
+PORTAGE_COMPRESS=${PORTAGE_COMPRESS-bzip2} |
1702 |
+[[ -z ${PORTAGE_COMPRESS} ]] && exit 0 |
1703 |
+ |
1704 |
+if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then |
1705 |
+ case ${PORTAGE_COMPRESS} in |
1706 |
+ bzip2|gzip) PORTAGE_COMPRESS_FLAGS="-9";; |
1707 |
+ esac |
1708 |
+fi |
1709 |
+ |
1710 |
+case $1 in |
1711 |
+ --suffix) |
1712 |
+ [[ -n $2 ]] && vecho "${0##*/}: --suffix takes no additional arguments" 1>&2 |
1713 |
+ |
1714 |
+ if [[ ! -e ${T}/.ecompress.suffix ]] ; then |
1715 |
+ set -e |
1716 |
+ tmpdir="${T}"/.ecompress$$.${RANDOM} |
1717 |
+ mkdir "${tmpdir}" |
1718 |
+ cd "${tmpdir}" |
1719 |
+ # we have to fill the file enough so that there is something |
1720 |
+ # to compress as some programs will refuse to do compression |
1721 |
+ # if it cannot actually compress the file |
1722 |
+ echo {0..1000} > compressme |
1723 |
+ ${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS} compressme > /dev/null |
1724 |
+ suffix=$(ls compressme*) |
1725 |
+ suffix=${suffix#compressme} |
1726 |
+ cd / |
1727 |
+ rm -rf "${tmpdir}" |
1728 |
+ echo "${suffix}" > "${T}/.ecompress.suffix" |
1729 |
+ fi |
1730 |
+ cat "${T}/.ecompress.suffix" |
1731 |
+ ;; |
1732 |
+ --bin) |
1733 |
+ [[ -n $2 ]] && vecho "${0##*/}: --bin takes no additional arguments" 1>&2 |
1734 |
+ |
1735 |
+ echo "${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}" |
1736 |
+ ;; |
1737 |
+ --queue) |
1738 |
+ shift |
1739 |
+ exec touch "${@/%/.ecompress.file}" |
1740 |
+ ;; |
1741 |
+ --dequeue) |
1742 |
+ [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2 |
1743 |
+ find "${D}" -name '*.ecompress.file' -print0 \ |
1744 |
+ | sed -e 's:\.ecompress\.file::g' \ |
1745 |
+ | ${XARGS} -0 ecompress |
1746 |
+ find "${D}" -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f |
1747 |
+ ;; |
1748 |
+ --*) |
1749 |
+ vecho "${0##*/}: unknown arguments '$*'" 1>&2 |
1750 |
+ exit 1 |
1751 |
+ ;; |
1752 |
+ *) |
1753 |
+ mask_ext_re="" |
1754 |
+ set -f |
1755 |
+ for x in $PORTAGE_COMPRESS_EXCLUDE_SUFFIXES ; do |
1756 |
+ mask_ext_re+="|$x" |
1757 |
+ done |
1758 |
+ set +f |
1759 |
+ mask_ext_re="^(${mask_ext_re:1})\$" |
1760 |
+ declare -a filtered_args=() |
1761 |
+ i=0 |
1762 |
+ for x in "$@" ; do |
1763 |
+ [[ ${x##*.} =~ $mask_ext_re ]] && continue |
1764 |
+ filtered_args[$i]=$x |
1765 |
+ (( i++ )) |
1766 |
+ done |
1767 |
+ [ $i -eq 0 ] && exit 0 |
1768 |
+ set -- "${filtered_args[@]}" |
1769 |
+ |
1770 |
+ # If a compressed version of the file already exists, simply |
1771 |
+ # delete it so that the compressor doesn't whine (bzip2 will |
1772 |
+ # complain and skip, gzip will prompt for input) |
1773 |
+ suffix=$(ecompress --suffix) |
1774 |
+ [[ -n ${suffix} ]] && echo -n "${@/%/${suffix}$'\001'}" | \ |
1775 |
+ tr '\001' '\000' | ${XARGS} -0 rm -f |
1776 |
+ # Finally, let's actually do some real work |
1777 |
+ exec "${PORTAGE_COMPRESS}" ${PORTAGE_COMPRESS_FLAGS} "$@" |
1778 |
+ ;; |
1779 |
+esac |
1780 |
|
1781 |
Copied: main/trunk/bin/ebuild-helpers/ecompressdir (from rev 13057, main/trunk/bin/ecompressdir) |
1782 |
=================================================================== |
1783 |
--- main/trunk/bin/ebuild-helpers/ecompressdir (rev 0) |
1784 |
+++ main/trunk/bin/ebuild-helpers/ecompressdir 2009-03-12 00:28:45 UTC (rev 13063) |
1785 |
@@ -0,0 +1,136 @@ |
1786 |
+#!/bin/bash |
1787 |
+# Copyright 1999-2007 Gentoo Foundation |
1788 |
+# Distributed under the terms of the GNU General Public License v2 |
1789 |
+# $Id$ |
1790 |
+ |
1791 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
1792 |
+ |
1793 |
+if [[ -z $1 ]] ; then |
1794 |
+ vecho "${0##*/}: at least one argument needed" 1>&2 |
1795 |
+ exit 1 |
1796 |
+fi |
1797 |
+ |
1798 |
+case $1 in |
1799 |
+ --ignore) |
1800 |
+ shift |
1801 |
+ for skip in "$@" ; do |
1802 |
+ [[ -d ${D}${skip} ]] && touch "${D}${skip}.ecompress.skip" |
1803 |
+ done |
1804 |
+ exit 0 |
1805 |
+ ;; |
1806 |
+ --queue) |
1807 |
+ shift |
1808 |
+ set -- "${@/%/.ecompress.dir}" |
1809 |
+ set -- "${@/#/${D}}" |
1810 |
+ exec touch "$@" |
1811 |
+ ;; |
1812 |
+ --dequeue) |
1813 |
+ [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2 |
1814 |
+ find "${D}" -name '*.ecompress.dir' -print0 \ |
1815 |
+ | sed -e 's:\.ecompress\.dir::g' -e "s:${D}:/:g" \ |
1816 |
+ | ${XARGS} -0 ecompressdir |
1817 |
+ find "${D}" -name '*.ecompress.skip' -print0 | ${XARGS} -0 rm -f |
1818 |
+ exit 0 |
1819 |
+ ;; |
1820 |
+ --*) |
1821 |
+ vecho "${0##*/}: unknown arguments '$*'" |
1822 |
+ exit 1 |
1823 |
+ ;; |
1824 |
+esac |
1825 |
+ |
1826 |
+# figure out the new suffix |
1827 |
+suffix=$(ecompress --suffix) |
1828 |
+ |
1829 |
+# funk_up_dir(action, suffix, binary) |
1830 |
+# - action: compress or decompress |
1831 |
+# - suffix: the compression suffix to work with |
1832 |
+# - binary: the program to execute that'll compress/decompress |
1833 |
+# The directory we act on is implied in the ${dir} variable |
1834 |
+funk_up_dir() { |
1835 |
+ local act=$1 suffix=$2 binary=$3 |
1836 |
+ |
1837 |
+ local negate="" |
1838 |
+ [[ ${act} == "compress" ]] && negate="!" |
1839 |
+ |
1840 |
+ # first we act on all the files |
1841 |
+ find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary} |
1842 |
+ ((ret+=$?)) |
1843 |
+ |
1844 |
+ find "${dir}" -type l -print0 | \ |
1845 |
+ while read -d $'\0' brokenlink ; do |
1846 |
+ [[ -e ${brokenlink} ]] && continue |
1847 |
+ olddest=$(readlink "${brokenlink}") |
1848 |
+ [[ ${act} == "compress" ]] \ |
1849 |
+ && newdest="${olddest}${suffix}" \ |
1850 |
+ || newdest="${olddest%${suffix}}" |
1851 |
+ rm -f "${brokenlink}" |
1852 |
+ [[ ${act} == "compress" ]] \ |
1853 |
+ && ln -snf "${newdest}" "${brokenlink}${suffix}" \ |
1854 |
+ || ln -snf "${newdest}" "${brokenlink%${suffix}}" |
1855 |
+ ((ret+=$?)) |
1856 |
+ done |
1857 |
+} |
1858 |
+ |
1859 |
+# _relocate_skip_dirs(srctree, dsttree) |
1860 |
+# Move all the directories we want to skip running compression |
1861 |
+# on from srctree to dsttree. |
1862 |
+_relocate_skip_dirs() { |
1863 |
+ local srctree="$1" dsttree="$2" |
1864 |
+ |
1865 |
+ [[ -d ${srctree} ]] || return 0 |
1866 |
+ |
1867 |
+ find "${srctree}" -name '*.ecompress.skip' -print0 | \ |
1868 |
+ while read -d $'\0' src ; do |
1869 |
+ src=${src%.ecompress.skip} |
1870 |
+ dst="${dsttree}${src#${srctree}}" |
1871 |
+ parent=${dst%/*} |
1872 |
+ mkdir -p "${parent}" |
1873 |
+ mv "${src}" "${dst}" |
1874 |
+ mv "${src}.ecompress.skip" "${dst}.ecompress.skip" |
1875 |
+ done |
1876 |
+} |
1877 |
+hide_skip_dirs() { _relocate_skip_dirs "${D}" "${T}"/ecompress-skip/ ; } |
1878 |
+restore_skip_dirs() { _relocate_skip_dirs "${T}"/ecompress-skip/ "${D}" ; } |
1879 |
+ |
1880 |
+ret=0 |
1881 |
+ |
1882 |
+rm -rf "${T}"/ecompress-skip |
1883 |
+ |
1884 |
+for dir in "$@" ; do |
1885 |
+ dir=${dir#/} |
1886 |
+ dir="${D}${dir}" |
1887 |
+ if [[ ! -d ${dir} ]] ; then |
1888 |
+ vecho "${0##*/}: /${dir#${D}} does not exist!" |
1889 |
+ continue |
1890 |
+ fi |
1891 |
+ cd "${dir}" |
1892 |
+ actual_dir=${dir} |
1893 |
+ dir=. # use relative path to avoid 'Argument list too long' errors |
1894 |
+ |
1895 |
+ # hide all the stuff we want to skip |
1896 |
+ hide_skip_dirs "${dir}" |
1897 |
+ |
1898 |
+ # since we've been requested to compress the whole dir, |
1899 |
+ # delete any individual queued requests |
1900 |
+ rm -f "${actual_dir}.ecompress.dir" |
1901 |
+ find "${dir}" -type f -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f |
1902 |
+ |
1903 |
+ # not uncommon for packages to compress doc files themselves |
1904 |
+ funk_up_dir "decompress" ".Z" "gunzip -f" |
1905 |
+ funk_up_dir "decompress" ".gz" "gunzip -f" |
1906 |
+ funk_up_dir "decompress" ".bz2" "bunzip2 -f" |
1907 |
+ |
1908 |
+ # forcibly break all hard links as some compressors whine about it |
1909 |
+ find "${dir}" -type f -links +1 -exec env file="{}" sh -c \ |
1910 |
+ 'cp -p "${file}" "${file}.ecompress.break" ; mv -f "${file}.ecompress.break" "${file}"' \; |
1911 |
+ |
1912 |
+ # now lets do our work |
1913 |
+ [[ -z ${suffix} ]] && continue |
1914 |
+ vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${D}}" |
1915 |
+ funk_up_dir "compress" "${suffix}" "ecompress" |
1916 |
+ |
1917 |
+ # finally, restore the skipped stuff |
1918 |
+ restore_skip_dirs |
1919 |
+done |
1920 |
+ |
1921 |
+exit ${ret} |
1922 |
|
1923 |
Copied: main/trunk/bin/ebuild-helpers/emake (from rev 13057, main/trunk/bin/emake) |
1924 |
=================================================================== |
1925 |
--- main/trunk/bin/ebuild-helpers/emake (rev 0) |
1926 |
+++ main/trunk/bin/ebuild-helpers/emake 2009-03-12 00:28:45 UTC (rev 13063) |
1927 |
@@ -0,0 +1,25 @@ |
1928 |
+#!/bin/bash |
1929 |
+# Copyright 1999-2006 Gentoo Foundation |
1930 |
+# Distributed under the terms of the GNU General Public License v2 |
1931 |
+# $Id$ |
1932 |
+# |
1933 |
+# emake: Supplies some default parameters to GNU make. At the moment the |
1934 |
+# only parameter supplied is -jN, where N is a number of |
1935 |
+# parallel processes that should be ideal for the running host |
1936 |
+# (e.g. on a single-CPU machine, N=2). The MAKEOPTS variable |
1937 |
+# is set in /etc/make.globals. We don't source |
1938 |
+# /etc/make.globals here because emake is only called from an |
1939 |
+# ebuild. |
1940 |
+ |
1941 |
+if [[ $PORTAGE_QUIET != 1 ]] ; then |
1942 |
+ ( |
1943 |
+ for arg in ${MAKE:-make} $MAKEOPTS $EXTRA_EMAKE "$@" ; do |
1944 |
+ [[ ${arg} == *" "* ]] \ |
1945 |
+ && printf "'%s' " "${arg}" \ |
1946 |
+ || printf "%s " "${arg}" |
1947 |
+ done |
1948 |
+ printf "\n" |
1949 |
+ ) >&2 |
1950 |
+fi |
1951 |
+ |
1952 |
+exec ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@" |
1953 |
|
1954 |
Copied: main/trunk/bin/ebuild-helpers/fowners (from rev 13057, main/trunk/bin/fowners) |
1955 |
=================================================================== |
1956 |
--- main/trunk/bin/ebuild-helpers/fowners (rev 0) |
1957 |
+++ main/trunk/bin/ebuild-helpers/fowners 2009-03-12 00:28:45 UTC (rev 13063) |
1958 |
@@ -0,0 +1,9 @@ |
1959 |
+#!/bin/bash |
1960 |
+# Copyright 1999-2007 Gentoo Foundation |
1961 |
+# Distributed under the terms of the GNU General Public License v2 |
1962 |
+# $Id$ |
1963 |
+ |
1964 |
+# we can't prefix all arguments because |
1965 |
+# chown takes random options |
1966 |
+slash="/" |
1967 |
+exec chown "${@/#${slash}/${D}${slash}}" |
1968 |
|
1969 |
Copied: main/trunk/bin/ebuild-helpers/fperms (from rev 13057, main/trunk/bin/fperms) |
1970 |
=================================================================== |
1971 |
--- main/trunk/bin/ebuild-helpers/fperms (rev 0) |
1972 |
+++ main/trunk/bin/ebuild-helpers/fperms 2009-03-12 00:28:45 UTC (rev 13063) |
1973 |
@@ -0,0 +1,9 @@ |
1974 |
+#!/bin/bash |
1975 |
+# Copyright 1999-2007 Gentoo Foundation |
1976 |
+# Distributed under the terms of the GNU General Public License v2 |
1977 |
+# $Id$ |
1978 |
+ |
1979 |
+# we can't prefix all arguments because |
1980 |
+# chmod takes random options |
1981 |
+slash="/" |
1982 |
+exec chmod "${@/#${slash}/${D}${slash}}" |
1983 |
|
1984 |
Copied: main/trunk/bin/ebuild-helpers/newbin (from rev 13057, main/trunk/bin/newbin) |
1985 |
=================================================================== |
1986 |
--- main/trunk/bin/ebuild-helpers/newbin (rev 0) |
1987 |
+++ main/trunk/bin/ebuild-helpers/newbin 2009-03-12 00:28:45 UTC (rev 13063) |
1988 |
@@ -0,0 +1,18 @@ |
1989 |
+#!/bin/bash |
1990 |
+# Copyright 1999-2006 Gentoo Foundation |
1991 |
+# Distributed under the terms of the GNU General Public License v2 |
1992 |
+# $Id$ |
1993 |
+ |
1994 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
1995 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
1996 |
+ exit 1 |
1997 |
+fi |
1998 |
+ |
1999 |
+if [ ! -e "$1" ] ; then |
2000 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2001 |
+ exit 1 |
2002 |
+fi |
2003 |
+ |
2004 |
+rm -rf "${T}/${2}" && \ |
2005 |
+cp -f "${1}" "${T}/${2}" && \ |
2006 |
+exec dobin "${T}/${2}" |
2007 |
|
2008 |
Copied: main/trunk/bin/ebuild-helpers/newconfd (from rev 13057, main/trunk/bin/newconfd) |
2009 |
=================================================================== |
2010 |
--- main/trunk/bin/ebuild-helpers/newconfd (rev 0) |
2011 |
+++ main/trunk/bin/ebuild-helpers/newconfd 2009-03-12 00:28:45 UTC (rev 13063) |
2012 |
@@ -0,0 +1,18 @@ |
2013 |
+#!/bin/bash |
2014 |
+# Copyright 1999-2006 Gentoo Foundation |
2015 |
+# Distributed under the terms of the GNU General Public License v2 |
2016 |
+# $Id$ |
2017 |
+ |
2018 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2019 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2020 |
+ exit 1 |
2021 |
+fi |
2022 |
+ |
2023 |
+if [ ! -e "$1" ] ; then |
2024 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2025 |
+ exit 1 |
2026 |
+fi |
2027 |
+ |
2028 |
+rm -rf "${T}/${2}" && \ |
2029 |
+cp -f "${1}" "${T}/${2}" && \ |
2030 |
+exec doconfd "${T}/${2}" |
2031 |
|
2032 |
Copied: main/trunk/bin/ebuild-helpers/newdoc (from rev 13057, main/trunk/bin/newdoc) |
2033 |
=================================================================== |
2034 |
--- main/trunk/bin/ebuild-helpers/newdoc (rev 0) |
2035 |
+++ main/trunk/bin/ebuild-helpers/newdoc 2009-03-12 00:28:45 UTC (rev 13063) |
2036 |
@@ -0,0 +1,18 @@ |
2037 |
+#!/bin/bash |
2038 |
+# Copyright 1999-2006 Gentoo Foundation |
2039 |
+# Distributed under the terms of the GNU General Public License v2 |
2040 |
+# $Id$ |
2041 |
+ |
2042 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2043 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2044 |
+ exit 1 |
2045 |
+fi |
2046 |
+ |
2047 |
+if [ ! -e "$1" ] ; then |
2048 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2049 |
+ exit 1 |
2050 |
+fi |
2051 |
+ |
2052 |
+rm -rf "${T}/${2}" && \ |
2053 |
+cp -f "${1}" "${T}/${2}" && \ |
2054 |
+exec dodoc "${T}/${2}" |
2055 |
|
2056 |
Copied: main/trunk/bin/ebuild-helpers/newenvd (from rev 13057, main/trunk/bin/newenvd) |
2057 |
=================================================================== |
2058 |
--- main/trunk/bin/ebuild-helpers/newenvd (rev 0) |
2059 |
+++ main/trunk/bin/ebuild-helpers/newenvd 2009-03-12 00:28:45 UTC (rev 13063) |
2060 |
@@ -0,0 +1,18 @@ |
2061 |
+#!/bin/bash |
2062 |
+# Copyright 1999-2006 Gentoo Foundation |
2063 |
+# Distributed under the terms of the GNU General Public License v2 |
2064 |
+# $Id$ |
2065 |
+ |
2066 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2067 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2068 |
+ exit 1 |
2069 |
+fi |
2070 |
+ |
2071 |
+if [ ! -e "$1" ] ; then |
2072 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2073 |
+ exit 1 |
2074 |
+fi |
2075 |
+ |
2076 |
+rm -rf "${T}/${2}" && \ |
2077 |
+cp -f "${1}" "${T}/${2}" && \ |
2078 |
+exec doenvd "${T}/${2}" |
2079 |
|
2080 |
Copied: main/trunk/bin/ebuild-helpers/newexe (from rev 13057, main/trunk/bin/newexe) |
2081 |
=================================================================== |
2082 |
--- main/trunk/bin/ebuild-helpers/newexe (rev 0) |
2083 |
+++ main/trunk/bin/ebuild-helpers/newexe 2009-03-12 00:28:45 UTC (rev 13063) |
2084 |
@@ -0,0 +1,18 @@ |
2085 |
+#!/bin/bash |
2086 |
+# Copyright 1999-2006 Gentoo Foundation |
2087 |
+# Distributed under the terms of the GNU General Public License v2 |
2088 |
+# $Id$ |
2089 |
+ |
2090 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2091 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2092 |
+ exit 1 |
2093 |
+fi |
2094 |
+ |
2095 |
+if [ ! -e "$1" ] ; then |
2096 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2097 |
+ exit 1 |
2098 |
+fi |
2099 |
+ |
2100 |
+rm -rf "${T}/${2}" && \ |
2101 |
+cp -f "${1}" "${T}/${2}" && \ |
2102 |
+exec doexe "${T}/${2}" |
2103 |
|
2104 |
Copied: main/trunk/bin/ebuild-helpers/newinitd (from rev 13057, main/trunk/bin/newinitd) |
2105 |
=================================================================== |
2106 |
--- main/trunk/bin/ebuild-helpers/newinitd (rev 0) |
2107 |
+++ main/trunk/bin/ebuild-helpers/newinitd 2009-03-12 00:28:45 UTC (rev 13063) |
2108 |
@@ -0,0 +1,18 @@ |
2109 |
+#!/bin/bash |
2110 |
+# Copyright 1999-2006 Gentoo Foundation |
2111 |
+# Distributed under the terms of the GNU General Public License v2 |
2112 |
+# $Id$ |
2113 |
+ |
2114 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2115 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2116 |
+ exit 1 |
2117 |
+fi |
2118 |
+ |
2119 |
+if [ ! -e "$1" ] ; then |
2120 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2121 |
+ exit 1 |
2122 |
+fi |
2123 |
+ |
2124 |
+rm -rf "${T}/${2}" && \ |
2125 |
+cp -f "${1}" "${T}/${2}" && \ |
2126 |
+exec doinitd "${T}/${2}" |
2127 |
|
2128 |
Copied: main/trunk/bin/ebuild-helpers/newins (from rev 13057, main/trunk/bin/newins) |
2129 |
=================================================================== |
2130 |
--- main/trunk/bin/ebuild-helpers/newins (rev 0) |
2131 |
+++ main/trunk/bin/ebuild-helpers/newins 2009-03-12 00:28:45 UTC (rev 13063) |
2132 |
@@ -0,0 +1,21 @@ |
2133 |
+#!/bin/bash |
2134 |
+# Copyright 1999-2006 Gentoo Foundation |
2135 |
+# Distributed under the terms of the GNU General Public License v2 |
2136 |
+# $Id$ |
2137 |
+ |
2138 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2139 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2140 |
+ exit 1 |
2141 |
+fi |
2142 |
+ |
2143 |
+if [ ! -e "$1" ] ; then |
2144 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2145 |
+ exit 1 |
2146 |
+fi |
2147 |
+ |
2148 |
+rm -rf "${T}/${2}" || exit $? |
2149 |
+cp -f "${1}" "${T}/${2}" || exit $? |
2150 |
+doins "${T}/${2}" |
2151 |
+ret=$? |
2152 |
+rm -rf "${T}/${2}" |
2153 |
+exit $ret |
2154 |
|
2155 |
Copied: main/trunk/bin/ebuild-helpers/newlib.a (from rev 13057, main/trunk/bin/newlib.a) |
2156 |
=================================================================== |
2157 |
--- main/trunk/bin/ebuild-helpers/newlib.a (rev 0) |
2158 |
+++ main/trunk/bin/ebuild-helpers/newlib.a 2009-03-12 00:28:45 UTC (rev 13063) |
2159 |
@@ -0,0 +1,18 @@ |
2160 |
+#!/bin/bash |
2161 |
+# Copyright 1999-2006 Gentoo Foundation |
2162 |
+# Distributed under the terms of the GNU General Public License v2 |
2163 |
+# $Id$ |
2164 |
+ |
2165 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2166 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2167 |
+ exit 1 |
2168 |
+fi |
2169 |
+ |
2170 |
+if [ ! -e "$1" ] ; then |
2171 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2172 |
+ exit 1 |
2173 |
+fi |
2174 |
+ |
2175 |
+rm -rf "${T}/${2}" && \ |
2176 |
+cp -f "${1}" "${T}/${2}" && \ |
2177 |
+exec dolib.a "${T}/${2}" |
2178 |
|
2179 |
Copied: main/trunk/bin/ebuild-helpers/newlib.so (from rev 13057, main/trunk/bin/newlib.so) |
2180 |
=================================================================== |
2181 |
--- main/trunk/bin/ebuild-helpers/newlib.so (rev 0) |
2182 |
+++ main/trunk/bin/ebuild-helpers/newlib.so 2009-03-12 00:28:45 UTC (rev 13063) |
2183 |
@@ -0,0 +1,18 @@ |
2184 |
+#!/bin/bash |
2185 |
+# Copyright 1999-2006 Gentoo Foundation |
2186 |
+# Distributed under the terms of the GNU General Public License v2 |
2187 |
+# $Id$ |
2188 |
+ |
2189 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2190 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2191 |
+ exit 1 |
2192 |
+fi |
2193 |
+ |
2194 |
+if [ ! -e "$1" ] ; then |
2195 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2196 |
+ exit 1 |
2197 |
+fi |
2198 |
+ |
2199 |
+rm -rf "${T}/${2}" && \ |
2200 |
+cp -f "${1}" "${T}/${2}" && \ |
2201 |
+exec dolib.so "${T}/${2}" |
2202 |
|
2203 |
Copied: main/trunk/bin/ebuild-helpers/newman (from rev 13057, main/trunk/bin/newman) |
2204 |
=================================================================== |
2205 |
--- main/trunk/bin/ebuild-helpers/newman (rev 0) |
2206 |
+++ main/trunk/bin/ebuild-helpers/newman 2009-03-12 00:28:45 UTC (rev 13063) |
2207 |
@@ -0,0 +1,18 @@ |
2208 |
+#!/bin/bash |
2209 |
+# Copyright 1999-2006 Gentoo Foundation |
2210 |
+# Distributed under the terms of the GNU General Public License v2 |
2211 |
+# $Id$ |
2212 |
+ |
2213 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2214 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2215 |
+ exit 1 |
2216 |
+fi |
2217 |
+ |
2218 |
+if [ ! -e "$1" ] ; then |
2219 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2220 |
+ exit 1 |
2221 |
+fi |
2222 |
+ |
2223 |
+rm -rf "${T}/${2}" && \ |
2224 |
+cp -f "${1}" "${T}/${2}" && \ |
2225 |
+exec doman "${T}/${2}" |
2226 |
|
2227 |
Copied: main/trunk/bin/ebuild-helpers/newsbin (from rev 13057, main/trunk/bin/newsbin) |
2228 |
=================================================================== |
2229 |
--- main/trunk/bin/ebuild-helpers/newsbin (rev 0) |
2230 |
+++ main/trunk/bin/ebuild-helpers/newsbin 2009-03-12 00:28:45 UTC (rev 13063) |
2231 |
@@ -0,0 +1,18 @@ |
2232 |
+#!/bin/bash |
2233 |
+# Copyright 1999-2006 Gentoo Foundation |
2234 |
+# Distributed under the terms of the GNU General Public License v2 |
2235 |
+# $Id$ |
2236 |
+ |
2237 |
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
2238 |
+ echo "$0: Need two arguments, old file and new file" 1>&2 |
2239 |
+ exit 1 |
2240 |
+fi |
2241 |
+ |
2242 |
+if [ ! -e "$1" ] ; then |
2243 |
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
2244 |
+ exit 1 |
2245 |
+fi |
2246 |
+ |
2247 |
+rm -rf "${T}/${2}" && \ |
2248 |
+cp -f "${1}" "${T}/${2}" && \ |
2249 |
+exec dosbin "${T}/${2}" |
2250 |
|
2251 |
Added: main/trunk/bin/ebuild-helpers/portageq |
2252 |
=================================================================== |
2253 |
--- main/trunk/bin/ebuild-helpers/portageq (rev 0) |
2254 |
+++ main/trunk/bin/ebuild-helpers/portageq 2009-03-12 00:28:45 UTC (rev 13063) |
2255 |
@@ -0,0 +1 @@ |
2256 |
+link ../portageq |
2257 |
\ No newline at end of file |
2258 |
|
2259 |
|
2260 |
Property changes on: main/trunk/bin/ebuild-helpers/portageq |
2261 |
___________________________________________________________________ |
2262 |
Name: svn:special |
2263 |
+ * |
2264 |
|
2265 |
Copied: main/trunk/bin/ebuild-helpers/prepall (from rev 13057, main/trunk/bin/prepall) |
2266 |
=================================================================== |
2267 |
--- main/trunk/bin/ebuild-helpers/prepall (rev 0) |
2268 |
+++ main/trunk/bin/ebuild-helpers/prepall 2009-03-12 00:28:45 UTC (rev 13063) |
2269 |
@@ -0,0 +1,24 @@ |
2270 |
+#!/bin/bash |
2271 |
+# Copyright 1999-2007 Gentoo Foundation |
2272 |
+# Distributed under the terms of the GNU General Public License v2 |
2273 |
+# $Id$ |
2274 |
+ |
2275 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2276 |
+ |
2277 |
+if type -P chflags > /dev/null && type -P mtree > /dev/null ; then |
2278 |
+ # Save all the file flags for restoration at the end of prepall. |
2279 |
+ mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree" |
2280 |
+ # Remove all the file flags so that prepall can do anything necessary. |
2281 |
+ chflags -R noschg,nouchg,nosappnd,nouappnd "${D}" |
2282 |
+ chflags -R nosunlnk,nouunlnk "${D}" 2>/dev/null |
2283 |
+fi |
2284 |
+ |
2285 |
+prepallman |
2286 |
+prepallinfo |
2287 |
+ |
2288 |
+prepallstrip |
2289 |
+ |
2290 |
+if type -P chflags > /dev/null && type -P mtree > /dev/null; then |
2291 |
+ # Restore all the file flags that were saved at the beginning of prepall. |
2292 |
+ mtree -U -e -p "${D}" -k flags < "${T}/bsdflags.mtree" &> /dev/null |
2293 |
+fi |
2294 |
|
2295 |
Copied: main/trunk/bin/ebuild-helpers/prepalldocs (from rev 13057, main/trunk/bin/prepalldocs) |
2296 |
=================================================================== |
2297 |
--- main/trunk/bin/ebuild-helpers/prepalldocs (rev 0) |
2298 |
+++ main/trunk/bin/ebuild-helpers/prepalldocs 2009-03-12 00:28:45 UTC (rev 13063) |
2299 |
@@ -0,0 +1,16 @@ |
2300 |
+#!/bin/bash |
2301 |
+# Copyright 1999-2007 Gentoo Foundation |
2302 |
+# Distributed under the terms of the GNU General Public License v2 |
2303 |
+# $Id$ |
2304 |
+ |
2305 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2306 |
+ |
2307 |
+if [[ -n $1 ]] ; then |
2308 |
+ vecho "${0##*/}: invalid usage; takes no arguments" 1>&2 |
2309 |
+fi |
2310 |
+ |
2311 |
+cd "${D}" |
2312 |
+[[ -d usr/share/doc ]] || exit 0 |
2313 |
+ |
2314 |
+ecompressdir --ignore /usr/share/doc/${PF}/html |
2315 |
+ecompressdir --queue /usr/share/doc |
2316 |
|
2317 |
Copied: main/trunk/bin/ebuild-helpers/prepallinfo (from rev 13057, main/trunk/bin/prepallinfo) |
2318 |
=================================================================== |
2319 |
--- main/trunk/bin/ebuild-helpers/prepallinfo (rev 0) |
2320 |
+++ main/trunk/bin/ebuild-helpers/prepallinfo 2009-03-12 00:28:45 UTC (rev 13063) |
2321 |
@@ -0,0 +1,10 @@ |
2322 |
+#!/bin/bash |
2323 |
+# Copyright 1999-2006 Gentoo Foundation |
2324 |
+# Distributed under the terms of the GNU General Public License v2 |
2325 |
+# $Id$ |
2326 |
+ |
2327 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2328 |
+ |
2329 |
+[[ ! -d ${D}usr/share/info ]] && exit 0 |
2330 |
+ |
2331 |
+exec prepinfo |
2332 |
|
2333 |
Copied: main/trunk/bin/ebuild-helpers/prepallman (from rev 13057, main/trunk/bin/prepallman) |
2334 |
=================================================================== |
2335 |
--- main/trunk/bin/ebuild-helpers/prepallman (rev 0) |
2336 |
+++ main/trunk/bin/ebuild-helpers/prepallman 2009-03-12 00:28:45 UTC (rev 13063) |
2337 |
@@ -0,0 +1,17 @@ |
2338 |
+#!/bin/bash |
2339 |
+# Copyright 1999-2007 Gentoo Foundation |
2340 |
+# Distributed under the terms of the GNU General Public License v2 |
2341 |
+# $Id$ |
2342 |
+ |
2343 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2344 |
+ |
2345 |
+ret=0 |
2346 |
+ |
2347 |
+find "${D}" -type d -name man > "${T}"/prepallman.filelist |
2348 |
+while read mandir ; do |
2349 |
+ mandir=${mandir#${D}} |
2350 |
+ prepman "${mandir%/man}" |
2351 |
+ ((ret+=$?)) |
2352 |
+done < "${T}"/prepallman.filelist |
2353 |
+ |
2354 |
+exit ${ret} |
2355 |
|
2356 |
Copied: main/trunk/bin/ebuild-helpers/prepallstrip (from rev 13057, main/trunk/bin/prepallstrip) |
2357 |
=================================================================== |
2358 |
--- main/trunk/bin/ebuild-helpers/prepallstrip (rev 0) |
2359 |
+++ main/trunk/bin/ebuild-helpers/prepallstrip 2009-03-12 00:28:45 UTC (rev 13063) |
2360 |
@@ -0,0 +1,6 @@ |
2361 |
+#!/bin/bash |
2362 |
+# Copyright 1999-2006 Gentoo Foundation |
2363 |
+# Distributed under the terms of the GNU General Public License v2 |
2364 |
+# $Id$ |
2365 |
+ |
2366 |
+exec prepstrip "${D}" |
2367 |
|
2368 |
Copied: main/trunk/bin/ebuild-helpers/prepinfo (from rev 13057, main/trunk/bin/prepinfo) |
2369 |
=================================================================== |
2370 |
--- main/trunk/bin/ebuild-helpers/prepinfo (rev 0) |
2371 |
+++ main/trunk/bin/ebuild-helpers/prepinfo 2009-03-12 00:28:45 UTC (rev 13063) |
2372 |
@@ -0,0 +1,31 @@ |
2373 |
+#!/bin/bash |
2374 |
+# Copyright 1999-2007 Gentoo Foundation |
2375 |
+# Distributed under the terms of the GNU General Public License v2 |
2376 |
+# $Id$ |
2377 |
+ |
2378 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2379 |
+ |
2380 |
+if [[ -z $1 ]] ; then |
2381 |
+ infodir="/usr/share/info" |
2382 |
+else |
2383 |
+ if [[ -d ${D}$1/share/info ]] ; then |
2384 |
+ infodir="$1/share/info" |
2385 |
+ else |
2386 |
+ infodir="$1/info" |
2387 |
+ fi |
2388 |
+fi |
2389 |
+ |
2390 |
+if [[ ! -d ${D}${infodir} ]] ; then |
2391 |
+ if [[ -n $1 ]] ; then |
2392 |
+ vecho "${0##*/}: '${infodir}' does not exist!" |
2393 |
+ exit 1 |
2394 |
+ else |
2395 |
+ exit 0 |
2396 |
+ fi |
2397 |
+fi |
2398 |
+ |
2399 |
+find "${D}${infodir}" -type d -print0 | while read -d $'\0' x ; do |
2400 |
+ rm -f "${x}"/dir{,.info}{,.gz,.bz2} |
2401 |
+done |
2402 |
+ |
2403 |
+exec ecompressdir --queue "${infodir}" |
2404 |
|
2405 |
Copied: main/trunk/bin/ebuild-helpers/preplib (from rev 13057, main/trunk/bin/preplib) |
2406 |
=================================================================== |
2407 |
--- main/trunk/bin/ebuild-helpers/preplib (rev 0) |
2408 |
+++ main/trunk/bin/ebuild-helpers/preplib 2009-03-12 00:28:45 UTC (rev 13063) |
2409 |
@@ -0,0 +1,29 @@ |
2410 |
+#!/bin/bash |
2411 |
+# Copyright 1999-2006 Gentoo Foundation |
2412 |
+# Distributed under the terms of the GNU General Public License v2 |
2413 |
+# $Id$ |
2414 |
+ |
2415 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2416 |
+ |
2417 |
+eqawarn "QA Notice: Deprecated call to 'preplib'" |
2418 |
+ |
2419 |
+LIBDIR_VAR="LIBDIR_${ABI}" |
2420 |
+if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then |
2421 |
+ CONF_LIBDIR="${!LIBDIR_VAR}" |
2422 |
+fi |
2423 |
+unset LIBDIR_VAR |
2424 |
+ |
2425 |
+if [ -z "${CONF_LIBDIR}" ]; then |
2426 |
+ # we need this to default to lib so that things dont break |
2427 |
+ CONF_LIBDIR="lib" |
2428 |
+fi |
2429 |
+ |
2430 |
+if [ -z "$1" ] ; then |
2431 |
+ z="${D}usr/${CONF_LIBDIR}" |
2432 |
+else |
2433 |
+ z="${D}$1/${CONF_LIBDIR}" |
2434 |
+fi |
2435 |
+ |
2436 |
+if [ -d "${z}" ] ; then |
2437 |
+ ldconfig -n -N "${z}" |
2438 |
+fi |
2439 |
|
2440 |
Copied: main/trunk/bin/ebuild-helpers/prepman (from rev 13057, main/trunk/bin/prepman) |
2441 |
=================================================================== |
2442 |
--- main/trunk/bin/ebuild-helpers/prepman (rev 0) |
2443 |
+++ main/trunk/bin/ebuild-helpers/prepman 2009-03-12 00:28:45 UTC (rev 13063) |
2444 |
@@ -0,0 +1,30 @@ |
2445 |
+#!/bin/bash |
2446 |
+# Copyright 1999-2007 Gentoo Foundation |
2447 |
+# Distributed under the terms of the GNU General Public License v2 |
2448 |
+# $Id$ |
2449 |
+ |
2450 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2451 |
+ |
2452 |
+if [[ -z $1 ]] ; then |
2453 |
+ mandir="${D}usr/share/man" |
2454 |
+else |
2455 |
+ mandir="${D}$1/man" |
2456 |
+fi |
2457 |
+ |
2458 |
+if [[ ! -d ${mandir} ]] ; then |
2459 |
+ eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${D}}'" |
2460 |
+ exit 0 |
2461 |
+fi |
2462 |
+ |
2463 |
+shopt -s nullglob |
2464 |
+ |
2465 |
+really_is_mandir=0 |
2466 |
+ |
2467 |
+# use some heuristics to test if this is a real mandir |
2468 |
+for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do |
2469 |
+ [[ -d ${subdir} ]] && really_is_mandir=1 && break |
2470 |
+done |
2471 |
+ |
2472 |
+[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --queue "${mandir#${D}}" |
2473 |
+ |
2474 |
+exit 0 |
2475 |
|
2476 |
Copied: main/trunk/bin/ebuild-helpers/prepstrip (from rev 13057, main/trunk/bin/prepstrip) |
2477 |
=================================================================== |
2478 |
--- main/trunk/bin/ebuild-helpers/prepstrip (rev 0) |
2479 |
+++ main/trunk/bin/ebuild-helpers/prepstrip 2009-03-12 00:28:45 UTC (rev 13063) |
2480 |
@@ -0,0 +1,178 @@ |
2481 |
+#!/bin/bash |
2482 |
+# Copyright 1999-2007 Gentoo Foundation |
2483 |
+# Distributed under the terms of the GNU General Public License v2 |
2484 |
+# $Id$ |
2485 |
+ |
2486 |
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2487 |
+ |
2488 |
+banner=false |
2489 |
+SKIP_STRIP=false |
2490 |
+if hasq nostrip ${FEATURES} || \ |
2491 |
+ hasq strip ${RESTRICT} |
2492 |
+then |
2493 |
+ SKIP_STRIP=true |
2494 |
+ banner=true |
2495 |
+ hasq installsources ${FEATURES} || exit 0 |
2496 |
+fi |
2497 |
+ |
2498 |
+STRIP=${STRIP:-${CHOST}-strip} |
2499 |
+type -P -- ${STRIP} > /dev/null || STRIP=strip |
2500 |
+OBJCOPY=${OBJCOPY:-${CHOST}-objcopy} |
2501 |
+type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy |
2502 |
+ |
2503 |
+# We'll leave out -R .note for now until we can check out the relevance |
2504 |
+# of the section when it has the ALLOC flag set on it ... |
2505 |
+export SAFE_STRIP_FLAGS="--strip-unneeded" |
2506 |
+export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment} |
2507 |
+ |
2508 |
+if hasq installsources ${FEATURES} && ! type -P debugedit >/dev/null ; then |
2509 |
+ ewarn "FEATURES=installsources is enabled but the debugedit binary could not" |
2510 |
+ ewarn "be found. This feature will not work unless debugedit is installed!" |
2511 |
+fi |
2512 |
+ |
2513 |
+unset ${!INODE_*} |
2514 |
+ |
2515 |
+inode_var_name() { |
2516 |
+ if [[ $USERLAND = BSD ]] ; then |
2517 |
+ stat -f 'INODE_%d_%i' "$1" |
2518 |
+ else |
2519 |
+ stat -c 'INODE_%d_%i' "$1" |
2520 |
+ fi |
2521 |
+} |
2522 |
+ |
2523 |
+save_elf_sources() { |
2524 |
+ hasq installsources ${FEATURES} || return 0 |
2525 |
+ hasq installsources ${RESTRICT} && return 0 |
2526 |
+ type -P debugedit >/dev/null || return 0 |
2527 |
+ |
2528 |
+ local x=$1 |
2529 |
+ local inode=$(inode_var_name "$x") |
2530 |
+ [[ -n ${!inode} ]] && return 0 |
2531 |
+ local sources_dir=/usr/src/debug/${CATEGORY}/${PF} |
2532 |
+ debugedit -b "${WORKDIR}" -d "${sources_dir}" \ |
2533 |
+ -l "${T}"/debug.sources "${x}" |
2534 |
+ if [[ -s ${T}/debug.sources ]] ; then |
2535 |
+ [[ -d ${D}${sources_dir} ]] || mkdir -p "${D}${sources_dir}" |
2536 |
+ grep -zv '/<built-in>$' "${T}"/debug.sources | \ |
2537 |
+ (cd "${WORKDIR}"; LANG=C sort -z -u | \ |
2538 |
+ rsync -rtL0 --files-from=- "${WORKDIR}/" "${D}${sources_dir}/" ) |
2539 |
+ fi |
2540 |
+} |
2541 |
+ |
2542 |
+save_elf_debug() { |
2543 |
+ hasq splitdebug ${FEATURES} || return 0 |
2544 |
+ |
2545 |
+ local x=$1 |
2546 |
+ local y="${D}usr/lib/debug/${x:${#D}}.debug" |
2547 |
+ |
2548 |
+ # dont save debug info twice |
2549 |
+ [[ ${x} == *".debug" ]] && return 0 |
2550 |
+ |
2551 |
+ # this will recompute the build-id, but for now that's ok |
2552 |
+ local buildid="$( type -P debugedit >/dev/null && debugedit -i "${x}" )" |
2553 |
+ |
2554 |
+ mkdir -p $(dirname "${y}") |
2555 |
+ |
2556 |
+ local inode=$(inode_var_name "$x") |
2557 |
+ if [[ -n ${!inode} ]] ; then |
2558 |
+ ln "${D}usr/lib/debug/${!inode:${#D}}.debug" "$y" |
2559 |
+ else |
2560 |
+ eval $inode=\$x |
2561 |
+ ${OBJCOPY} --only-keep-debug "${x}" "${y}" |
2562 |
+ ${OBJCOPY} --add-gnu-debuglink="${y}" "${x}" |
2563 |
+ [[ -g ${x} ]] && chmod go-r "${y}" |
2564 |
+ [[ -u ${x} ]] && chmod go-r "${y}" |
2565 |
+ chmod a-x,o-w "${y}" |
2566 |
+ fi |
2567 |
+ |
2568 |
+ if [[ -n ${buildid} ]] ; then |
2569 |
+ local buildid_dir="${D}usr/lib/debug/.build-id/${buildid:0:2}" |
2570 |
+ local buildid_file="${buildid_dir}/${buildid:2}" |
2571 |
+ mkdir -p "${buildid_dir}" |
2572 |
+ ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug" |
2573 |
+ ln -s "/${x:${#D}}" "${buildid_file}" |
2574 |
+ fi |
2575 |
+} |
2576 |
+ |
2577 |
+# The existance of the section .symtab tells us that a binary is stripped. |
2578 |
+# We want to log already stripped binaries, as this may be a QA violation. |
2579 |
+# They prevent us from getting the splitdebug data. |
2580 |
+if ! hasq binchecks ${RESTRICT} && \ |
2581 |
+ ! hasq strip ${RESTRICT} ; then |
2582 |
+ log=$T/scanelf-already-stripped.log |
2583 |
+ scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^$D##" > "$log" |
2584 |
+ if [[ -n $QA_PRESTRIPPED && -s $log && \ |
2585 |
+ ${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then |
2586 |
+ shopts=$- |
2587 |
+ set -o noglob |
2588 |
+ for x in $QA_PRESTRIPPED ; do |
2589 |
+ sed -e "s#^${x#/}\$##" -i "$log" |
2590 |
+ done |
2591 |
+ set +o noglob |
2592 |
+ set -$shopts |
2593 |
+ fi |
2594 |
+ sed -e "/^\$/d" -e "s#^#/#" -i "$log" |
2595 |
+ if [[ -s $log ]] ; then |
2596 |
+ vecho -e "\a\n" |
2597 |
+ eqawarn "QA Notice: Pre-stripped files found:" |
2598 |
+ eqawarn "$(<"$log")" |
2599 |
+ else |
2600 |
+ rm -f "$log" |
2601 |
+ fi |
2602 |
+fi |
2603 |
+ |
2604 |
+# Now we look for unstripped binaries. |
2605 |
+for x in \ |
2606 |
+ $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \ |
2607 |
+ $(find "$@" -type f -name '*.a') |
2608 |
+do |
2609 |
+ if ! ${banner} ; then |
2610 |
+ vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}" |
2611 |
+ banner=true |
2612 |
+ fi |
2613 |
+ |
2614 |
+ f=$(file "${x}") || continue |
2615 |
+ [[ -z ${f} ]] && continue |
2616 |
+ |
2617 |
+ if ! ${SKIP_STRIP} ; then |
2618 |
+ # The noglob funk is to support STRIP_MASK="/*/booga" and to keep |
2619 |
+ # the for loop from expanding the globs. |
2620 |
+ # The eval echo is to support STRIP_MASK="/*/{booga,bar}" sex. |
2621 |
+ set -o noglob |
2622 |
+ strip_this=true |
2623 |
+ for m in $(eval echo ${STRIP_MASK}) ; do |
2624 |
+ [[ /${x#${D}} == ${m} ]] && strip_this=false && break |
2625 |
+ done |
2626 |
+ set +o noglob |
2627 |
+ else |
2628 |
+ strip_this=false |
2629 |
+ fi |
2630 |
+ |
2631 |
+ # only split debug info for final linked objects |
2632 |
+ # or kernel modules as debuginfo for intermediatary |
2633 |
+ # files (think crt*.o from gcc/glibc) is useless and |
2634 |
+ # actually causes problems. install sources for all |
2635 |
+ # elf types though cause that stuff is good. |
2636 |
+ |
2637 |
+ if [[ ${f} == *"current ar archive"* ]] ; then |
2638 |
+ vecho " ${x:${#D}}" |
2639 |
+ if ${strip_this} ; then |
2640 |
+ # hmm, can we split debug/sources for .a ? |
2641 |
+ ${STRIP} -g "${x}" |
2642 |
+ fi |
2643 |
+ elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then |
2644 |
+ vecho " ${x:${#D}}" |
2645 |
+ save_elf_sources "${x}" |
2646 |
+ if ${strip_this} ; then |
2647 |
+ save_elf_debug "${x}" |
2648 |
+ ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}" |
2649 |
+ fi |
2650 |
+ elif [[ ${f} == *"SB relocatable"* ]] ; then |
2651 |
+ vecho " ${x:${#D}}" |
2652 |
+ save_elf_sources "${x}" |
2653 |
+ if ${strip_this} ; then |
2654 |
+ [[ ${x} == *.ko ]] && save_elf_debug "${x}" |
2655 |
+ ${STRIP} ${SAFE_STRIP_FLAGS} "${x}" |
2656 |
+ fi |
2657 |
+ fi |
2658 |
+done |
2659 |
|
2660 |
Copied: main/trunk/bin/ebuild-helpers/sed (from rev 13057, main/trunk/bin/sed) |
2661 |
=================================================================== |
2662 |
--- main/trunk/bin/ebuild-helpers/sed (rev 0) |
2663 |
+++ main/trunk/bin/ebuild-helpers/sed 2009-03-12 00:28:45 UTC (rev 13063) |
2664 |
@@ -0,0 +1,28 @@ |
2665 |
+#!/bin/bash |
2666 |
+# Copyright 2007 Gentoo Foundation |
2667 |
+# Distributed under the terms of the GNU General Public License v2 |
2668 |
+# $Id$ |
2669 |
+ |
2670 |
+scriptpath=${BASH_SOURCE[0]} |
2671 |
+scriptname=${scriptpath##*/} |
2672 |
+ |
2673 |
+if [[ sed == ${scriptname} ]] && [[ -n ${ESED} ]]; then |
2674 |
+ exec ${ESED} "$@" |
2675 |
+elif type -P g${scriptname} > /dev/null ; then |
2676 |
+ exec g${scriptname} "$@" |
2677 |
+else |
2678 |
+ old_IFS="${IFS}" |
2679 |
+ IFS=":" |
2680 |
+ |
2681 |
+ for path in $PATH; do |
2682 |
+ [[ ${path}/${scriptname} == ${scriptpath} ]] && continue |
2683 |
+ if [[ -x ${path}/${scriptname} ]]; then |
2684 |
+ exec ${path}/${scriptname} "$@" |
2685 |
+ exit 0 |
2686 |
+ fi |
2687 |
+ done |
2688 |
+ |
2689 |
+ IFS="${old_IFS}" |
2690 |
+fi |
2691 |
+ |
2692 |
+exit 1 |
2693 |
|
2694 |
Modified: main/trunk/bin/ebuild.sh |
2695 |
=================================================================== |
2696 |
--- main/trunk/bin/ebuild.sh 2009-03-12 00:25:50 UTC (rev 13062) |
2697 |
+++ main/trunk/bin/ebuild.sh 2009-03-12 00:28:45 UTC (rev 13063) |
2698 |
@@ -70,7 +70,7 @@ |
2699 |
# Unset some variables that break things. |
2700 |
unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE |
2701 |
|
2702 |
-export PATH="/usr/local/sbin:/sbin:/usr/sbin:${PORTAGE_BIN_PATH}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" |
2703 |
+export PATH="/usr/local/sbin:/sbin:/usr/sbin:$PORTAGE_BIN_PATH/ebuild-helpers:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" |
2704 |
[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH" |
2705 |
|
2706 |
source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null |
2707 |
|
2708 |
Deleted: main/trunk/bin/ecompress |
2709 |
=================================================================== |
2710 |
--- main/trunk/bin/ecompress 2009-03-12 00:25:50 UTC (rev 13062) |
2711 |
+++ main/trunk/bin/ecompress 2009-03-12 00:28:45 UTC (rev 13063) |
2712 |
@@ -1,92 +0,0 @@ |
2713 |
-#!/bin/bash |
2714 |
-# Copyright 1999-2007 Gentoo Foundation |
2715 |
-# Distributed under the terms of the GNU General Public License v2 |
2716 |
-# $Id$ |
2717 |
- |
2718 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2719 |
- |
2720 |
-if [[ -z $1 ]] ; then |
2721 |
- vecho "${0##*/}: at least one argument needed" 1>&2 |
2722 |
- exit 1 |
2723 |
-fi |
2724 |
- |
2725 |
-# setup compression stuff |
2726 |
-PORTAGE_COMPRESS=${PORTAGE_COMPRESS-bzip2} |
2727 |
-[[ -z ${PORTAGE_COMPRESS} ]] && exit 0 |
2728 |
- |
2729 |
-if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then |
2730 |
- case ${PORTAGE_COMPRESS} in |
2731 |
- bzip2|gzip) PORTAGE_COMPRESS_FLAGS="-9";; |
2732 |
- esac |
2733 |
-fi |
2734 |
- |
2735 |
-case $1 in |
2736 |
- --suffix) |
2737 |
- [[ -n $2 ]] && vecho "${0##*/}: --suffix takes no additional arguments" 1>&2 |
2738 |
- |
2739 |
- if [[ ! -e ${T}/.ecompress.suffix ]] ; then |
2740 |
- set -e |
2741 |
- tmpdir="${T}"/.ecompress$$.${RANDOM} |
2742 |
- mkdir "${tmpdir}" |
2743 |
- cd "${tmpdir}" |
2744 |
- # we have to fill the file enough so that there is something |
2745 |
- # to compress as some programs will refuse to do compression |
2746 |
- # if it cannot actually compress the file |
2747 |
- echo {0..1000} > compressme |
2748 |
- ${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS} compressme > /dev/null |
2749 |
- suffix=$(ls compressme*) |
2750 |
- suffix=${suffix#compressme} |
2751 |
- cd / |
2752 |
- rm -rf "${tmpdir}" |
2753 |
- echo "${suffix}" > "${T}/.ecompress.suffix" |
2754 |
- fi |
2755 |
- cat "${T}/.ecompress.suffix" |
2756 |
- ;; |
2757 |
- --bin) |
2758 |
- [[ -n $2 ]] && vecho "${0##*/}: --bin takes no additional arguments" 1>&2 |
2759 |
- |
2760 |
- echo "${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}" |
2761 |
- ;; |
2762 |
- --queue) |
2763 |
- shift |
2764 |
- exec touch "${@/%/.ecompress.file}" |
2765 |
- ;; |
2766 |
- --dequeue) |
2767 |
- [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2 |
2768 |
- find "${D}" -name '*.ecompress.file' -print0 \ |
2769 |
- | sed -e 's:\.ecompress\.file::g' \ |
2770 |
- | ${XARGS} -0 ecompress |
2771 |
- find "${D}" -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f |
2772 |
- ;; |
2773 |
- --*) |
2774 |
- vecho "${0##*/}: unknown arguments '$*'" 1>&2 |
2775 |
- exit 1 |
2776 |
- ;; |
2777 |
- *) |
2778 |
- mask_ext_re="" |
2779 |
- set -f |
2780 |
- for x in $PORTAGE_COMPRESS_EXCLUDE_SUFFIXES ; do |
2781 |
- mask_ext_re+="|$x" |
2782 |
- done |
2783 |
- set +f |
2784 |
- mask_ext_re="^(${mask_ext_re:1})\$" |
2785 |
- declare -a filtered_args=() |
2786 |
- i=0 |
2787 |
- for x in "$@" ; do |
2788 |
- [[ ${x##*.} =~ $mask_ext_re ]] && continue |
2789 |
- filtered_args[$i]=$x |
2790 |
- (( i++ )) |
2791 |
- done |
2792 |
- [ $i -eq 0 ] && exit 0 |
2793 |
- set -- "${filtered_args[@]}" |
2794 |
- |
2795 |
- # If a compressed version of the file already exists, simply |
2796 |
- # delete it so that the compressor doesn't whine (bzip2 will |
2797 |
- # complain and skip, gzip will prompt for input) |
2798 |
- suffix=$(ecompress --suffix) |
2799 |
- [[ -n ${suffix} ]] && echo -n "${@/%/${suffix}$'\001'}" | \ |
2800 |
- tr '\001' '\000' | ${XARGS} -0 rm -f |
2801 |
- # Finally, let's actually do some real work |
2802 |
- exec "${PORTAGE_COMPRESS}" ${PORTAGE_COMPRESS_FLAGS} "$@" |
2803 |
- ;; |
2804 |
-esac |
2805 |
|
2806 |
Deleted: main/trunk/bin/ecompressdir |
2807 |
=================================================================== |
2808 |
--- main/trunk/bin/ecompressdir 2009-03-12 00:25:50 UTC (rev 13062) |
2809 |
+++ main/trunk/bin/ecompressdir 2009-03-12 00:28:45 UTC (rev 13063) |
2810 |
@@ -1,136 +0,0 @@ |
2811 |
-#!/bin/bash |
2812 |
-# Copyright 1999-2007 Gentoo Foundation |
2813 |
-# Distributed under the terms of the GNU General Public License v2 |
2814 |
-# $Id$ |
2815 |
- |
2816 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
2817 |
- |
2818 |
-if [[ -z $1 ]] ; then |
2819 |
- vecho "${0##*/}: at least one argument needed" 1>&2 |
2820 |
- exit 1 |
2821 |
-fi |
2822 |
- |
2823 |
-case $1 in |
2824 |
- --ignore) |
2825 |
- shift |
2826 |
- for skip in "$@" ; do |
2827 |
- [[ -d ${D}${skip} ]] && touch "${D}${skip}.ecompress.skip" |
2828 |
- done |
2829 |
- exit 0 |
2830 |
- ;; |
2831 |
- --queue) |
2832 |
- shift |
2833 |
- set -- "${@/%/.ecompress.dir}" |
2834 |
- set -- "${@/#/${D}}" |
2835 |
- exec touch "$@" |
2836 |
- ;; |
2837 |
- --dequeue) |
2838 |
- [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2 |
2839 |
- find "${D}" -name '*.ecompress.dir' -print0 \ |
2840 |
- | sed -e 's:\.ecompress\.dir::g' -e "s:${D}:/:g" \ |
2841 |
- | ${XARGS} -0 ecompressdir |
2842 |
- find "${D}" -name '*.ecompress.skip' -print0 | ${XARGS} -0 rm -f |
2843 |
- exit 0 |
2844 |
- ;; |
2845 |
- --*) |
2846 |
- vecho "${0##*/}: unknown arguments '$*'" |
2847 |
- exit 1 |
2848 |
- ;; |
2849 |
-esac |
2850 |
- |
2851 |
-# figure out the new suffix |
2852 |
-suffix=$(ecompress --suffix) |
2853 |
- |
2854 |
-# funk_up_dir(action, suffix, binary) |
2855 |
-# - action: compress or decompress |
2856 |
-# - suffix: the compression suffix to work with |
2857 |
-# - binary: the program to execute that'll compress/decompress |
2858 |
-# The directory we act on is implied in the ${dir} variable |
2859 |
-funk_up_dir() { |
2860 |
- local act=$1 suffix=$2 binary=$3 |
2861 |
- |
2862 |
- local negate="" |
2863 |
- [[ ${act} == "compress" ]] && negate="!" |
2864 |
- |
2865 |
- # first we act on all the files |
2866 |
- find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary} |
2867 |
- ((ret+=$?)) |
2868 |
- |
2869 |
- find "${dir}" -type l -print0 | \ |
2870 |
- while read -d $'\0' brokenlink ; do |
2871 |
- [[ -e ${brokenlink} ]] && continue |
2872 |
- olddest=$(readlink "${brokenlink}") |
2873 |
- [[ ${act} == "compress" ]] \ |
2874 |
- && newdest="${olddest}${suffix}" \ |
2875 |
- || newdest="${olddest%${suffix}}" |
2876 |
- rm -f "${brokenlink}" |
2877 |
- [[ ${act} == "compress" ]] \ |
2878 |
- && ln -snf "${newdest}" "${brokenlink}${suffix}" \ |
2879 |
- || ln -snf "${newdest}" "${brokenlink%${suffix}}" |
2880 |
- ((ret+=$?)) |
2881 |
- done |
2882 |
-} |
2883 |
- |
2884 |
-# _relocate_skip_dirs(srctree, dsttree) |
2885 |
-# Move all the directories we want to skip running compression |
2886 |
-# on from srctree to dsttree. |
2887 |
-_relocate_skip_dirs() { |
2888 |
- local srctree="$1" dsttree="$2" |
2889 |
- |
2890 |
- [[ -d ${srctree} ]] || return 0 |
2891 |
- |
2892 |
- find "${srctree}" -name '*.ecompress.skip' -print0 | \ |
2893 |
- while read -d $'\0' src ; do |
2894 |
- src=${src%.ecompress.skip} |
2895 |
- dst="${dsttree}${src#${srctree}}" |
2896 |
- parent=${dst%/*} |
2897 |
- mkdir -p "${parent}" |
2898 |
- mv "${src}" "${dst}" |
2899 |
- mv "${src}.ecompress.skip" "${dst}.ecompress.skip" |
2900 |
- done |
2901 |
-} |
2902 |
-hide_skip_dirs() { _relocate_skip_dirs "${D}" "${T}"/ecompress-skip/ ; } |
2903 |
-restore_skip_dirs() { _relocate_skip_dirs "${T}"/ecompress-skip/ "${D}" ; } |
2904 |
- |
2905 |
-ret=0 |
2906 |
- |
2907 |
-rm -rf "${T}"/ecompress-skip |
2908 |
- |
2909 |
-for dir in "$@" ; do |
2910 |
- dir=${dir#/} |
2911 |
- dir="${D}${dir}" |
2912 |
- if [[ ! -d ${dir} ]] ; then |
2913 |
- vecho "${0##*/}: /${dir#${D}} does not exist!" |
2914 |
- continue |
2915 |
- fi |
2916 |
- cd "${dir}" |
2917 |
- actual_dir=${dir} |
2918 |
- dir=. # use relative path to avoid 'Argument list too long' errors |
2919 |
- |
2920 |
- # hide all the stuff we want to skip |
2921 |
- hide_skip_dirs "${dir}" |
2922 |
- |
2923 |
- # since we've been requested to compress the whole dir, |
2924 |
- # delete any individual queued requests |
2925 |
- rm -f "${actual_dir}.ecompress.dir" |
2926 |
- find "${dir}" -type f -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f |
2927 |
- |
2928 |
- # not uncommon for packages to compress doc files themselves |
2929 |
- funk_up_dir "decompress" ".Z" "gunzip -f" |
2930 |
- funk_up_dir "decompress" ".gz" "gunzip -f" |
2931 |
- funk_up_dir "decompress" ".bz2" "bunzip2 -f" |
2932 |
- |
2933 |
- # forcibly break all hard links as some compressors whine about it |
2934 |
- find "${dir}" -type f -links +1 -exec env file="{}" sh -c \ |
2935 |
- 'cp -p "${file}" "${file}.ecompress.break" ; mv -f "${file}.ecompress.break" "${file}"' \; |
2936 |
- |
2937 |
- # now lets do our work |
2938 |
- [[ -z ${suffix} ]] && continue |
2939 |
- vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${D}}" |
2940 |
- funk_up_dir "compress" "${suffix}" "ecompress" |
2941 |
- |
2942 |
- # finally, restore the skipped stuff |
2943 |
- restore_skip_dirs |
2944 |
-done |
2945 |
- |
2946 |
-exit ${ret} |
2947 |
|
2948 |
Deleted: main/trunk/bin/emake |
2949 |
=================================================================== |
2950 |
--- main/trunk/bin/emake 2009-03-12 00:25:50 UTC (rev 13062) |
2951 |
+++ main/trunk/bin/emake 2009-03-12 00:28:45 UTC (rev 13063) |
2952 |
@@ -1,25 +0,0 @@ |
2953 |
-#!/bin/bash |
2954 |
-# Copyright 1999-2006 Gentoo Foundation |
2955 |
-# Distributed under the terms of the GNU General Public License v2 |
2956 |
-# $Id$ |
2957 |
-# |
2958 |
-# emake: Supplies some default parameters to GNU make. At the moment the |
2959 |
-# only parameter supplied is -jN, where N is a number of |
2960 |
-# parallel processes that should be ideal for the running host |
2961 |
-# (e.g. on a single-CPU machine, N=2). The MAKEOPTS variable |
2962 |
-# is set in /etc/make.globals. We don't source |
2963 |
-# /etc/make.globals here because emake is only called from an |
2964 |
-# ebuild. |
2965 |
- |
2966 |
-if [[ $PORTAGE_QUIET != 1 ]] ; then |
2967 |
- ( |
2968 |
- for arg in ${MAKE:-make} $MAKEOPTS $EXTRA_EMAKE "$@" ; do |
2969 |
- [[ ${arg} == *" "* ]] \ |
2970 |
- && printf "'%s' " "${arg}" \ |
2971 |
- || printf "%s " "${arg}" |
2972 |
- done |
2973 |
- printf "\n" |
2974 |
- ) >&2 |
2975 |
-fi |
2976 |
- |
2977 |
-exec ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@" |
2978 |
|
2979 |
Deleted: main/trunk/bin/fowners |
2980 |
=================================================================== |
2981 |
--- main/trunk/bin/fowners 2009-03-12 00:25:50 UTC (rev 13062) |
2982 |
+++ main/trunk/bin/fowners 2009-03-12 00:28:45 UTC (rev 13063) |
2983 |
@@ -1,9 +0,0 @@ |
2984 |
-#!/bin/bash |
2985 |
-# Copyright 1999-2007 Gentoo Foundation |
2986 |
-# Distributed under the terms of the GNU General Public License v2 |
2987 |
-# $Id$ |
2988 |
- |
2989 |
-# we can't prefix all arguments because |
2990 |
-# chown takes random options |
2991 |
-slash="/" |
2992 |
-exec chown "${@/#${slash}/${D}${slash}}" |
2993 |
|
2994 |
Deleted: main/trunk/bin/fperms |
2995 |
=================================================================== |
2996 |
--- main/trunk/bin/fperms 2009-03-12 00:25:50 UTC (rev 13062) |
2997 |
+++ main/trunk/bin/fperms 2009-03-12 00:28:45 UTC (rev 13063) |
2998 |
@@ -1,9 +0,0 @@ |
2999 |
-#!/bin/bash |
3000 |
-# Copyright 1999-2007 Gentoo Foundation |
3001 |
-# Distributed under the terms of the GNU General Public License v2 |
3002 |
-# $Id$ |
3003 |
- |
3004 |
-# we can't prefix all arguments because |
3005 |
-# chmod takes random options |
3006 |
-slash="/" |
3007 |
-exec chmod "${@/#${slash}/${D}${slash}}" |
3008 |
|
3009 |
Modified: main/trunk/bin/misc-functions.sh |
3010 |
=================================================================== |
3011 |
--- main/trunk/bin/misc-functions.sh 2009-03-12 00:25:50 UTC (rev 13062) |
3012 |
+++ main/trunk/bin/misc-functions.sh 2009-03-12 00:28:45 UTC (rev 13063) |
3013 |
@@ -382,7 +382,8 @@ |
3014 |
abort="yes" |
3015 |
fi |
3016 |
done |
3017 |
- f=$(cat "${PORTAGE_LOG_FILE}" | check-implicit-pointer-usage.py) |
3018 |
+ f=$(cat "${PORTAGE_LOG_FILE}" | \ |
3019 |
+ "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py) |
3020 |
if [[ -n ${f} ]] ; then |
3021 |
|
3022 |
# In the future this will be a forced "die". In preparation, |
3023 |
|
3024 |
Deleted: main/trunk/bin/newbin |
3025 |
=================================================================== |
3026 |
--- main/trunk/bin/newbin 2009-03-12 00:25:50 UTC (rev 13062) |
3027 |
+++ main/trunk/bin/newbin 2009-03-12 00:28:45 UTC (rev 13063) |
3028 |
@@ -1,18 +0,0 @@ |
3029 |
-#!/bin/bash |
3030 |
-# Copyright 1999-2006 Gentoo Foundation |
3031 |
-# Distributed under the terms of the GNU General Public License v2 |
3032 |
-# $Id$ |
3033 |
- |
3034 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3035 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3036 |
- exit 1 |
3037 |
-fi |
3038 |
- |
3039 |
-if [ ! -e "$1" ] ; then |
3040 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3041 |
- exit 1 |
3042 |
-fi |
3043 |
- |
3044 |
-rm -rf "${T}/${2}" && \ |
3045 |
-cp -f "${1}" "${T}/${2}" && \ |
3046 |
-exec dobin "${T}/${2}" |
3047 |
|
3048 |
Deleted: main/trunk/bin/newconfd |
3049 |
=================================================================== |
3050 |
--- main/trunk/bin/newconfd 2009-03-12 00:25:50 UTC (rev 13062) |
3051 |
+++ main/trunk/bin/newconfd 2009-03-12 00:28:45 UTC (rev 13063) |
3052 |
@@ -1,18 +0,0 @@ |
3053 |
-#!/bin/bash |
3054 |
-# Copyright 1999-2006 Gentoo Foundation |
3055 |
-# Distributed under the terms of the GNU General Public License v2 |
3056 |
-# $Id$ |
3057 |
- |
3058 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3059 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3060 |
- exit 1 |
3061 |
-fi |
3062 |
- |
3063 |
-if [ ! -e "$1" ] ; then |
3064 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3065 |
- exit 1 |
3066 |
-fi |
3067 |
- |
3068 |
-rm -rf "${T}/${2}" && \ |
3069 |
-cp -f "${1}" "${T}/${2}" && \ |
3070 |
-exec doconfd "${T}/${2}" |
3071 |
|
3072 |
Deleted: main/trunk/bin/newdoc |
3073 |
=================================================================== |
3074 |
--- main/trunk/bin/newdoc 2009-03-12 00:25:50 UTC (rev 13062) |
3075 |
+++ main/trunk/bin/newdoc 2009-03-12 00:28:45 UTC (rev 13063) |
3076 |
@@ -1,18 +0,0 @@ |
3077 |
-#!/bin/bash |
3078 |
-# Copyright 1999-2006 Gentoo Foundation |
3079 |
-# Distributed under the terms of the GNU General Public License v2 |
3080 |
-# $Id$ |
3081 |
- |
3082 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3083 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3084 |
- exit 1 |
3085 |
-fi |
3086 |
- |
3087 |
-if [ ! -e "$1" ] ; then |
3088 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3089 |
- exit 1 |
3090 |
-fi |
3091 |
- |
3092 |
-rm -rf "${T}/${2}" && \ |
3093 |
-cp -f "${1}" "${T}/${2}" && \ |
3094 |
-exec dodoc "${T}/${2}" |
3095 |
|
3096 |
Deleted: main/trunk/bin/newenvd |
3097 |
=================================================================== |
3098 |
--- main/trunk/bin/newenvd 2009-03-12 00:25:50 UTC (rev 13062) |
3099 |
+++ main/trunk/bin/newenvd 2009-03-12 00:28:45 UTC (rev 13063) |
3100 |
@@ -1,18 +0,0 @@ |
3101 |
-#!/bin/bash |
3102 |
-# Copyright 1999-2006 Gentoo Foundation |
3103 |
-# Distributed under the terms of the GNU General Public License v2 |
3104 |
-# $Id$ |
3105 |
- |
3106 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3107 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3108 |
- exit 1 |
3109 |
-fi |
3110 |
- |
3111 |
-if [ ! -e "$1" ] ; then |
3112 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3113 |
- exit 1 |
3114 |
-fi |
3115 |
- |
3116 |
-rm -rf "${T}/${2}" && \ |
3117 |
-cp -f "${1}" "${T}/${2}" && \ |
3118 |
-exec doenvd "${T}/${2}" |
3119 |
|
3120 |
Deleted: main/trunk/bin/newexe |
3121 |
=================================================================== |
3122 |
--- main/trunk/bin/newexe 2009-03-12 00:25:50 UTC (rev 13062) |
3123 |
+++ main/trunk/bin/newexe 2009-03-12 00:28:45 UTC (rev 13063) |
3124 |
@@ -1,18 +0,0 @@ |
3125 |
-#!/bin/bash |
3126 |
-# Copyright 1999-2006 Gentoo Foundation |
3127 |
-# Distributed under the terms of the GNU General Public License v2 |
3128 |
-# $Id$ |
3129 |
- |
3130 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3131 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3132 |
- exit 1 |
3133 |
-fi |
3134 |
- |
3135 |
-if [ ! -e "$1" ] ; then |
3136 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3137 |
- exit 1 |
3138 |
-fi |
3139 |
- |
3140 |
-rm -rf "${T}/${2}" && \ |
3141 |
-cp -f "${1}" "${T}/${2}" && \ |
3142 |
-exec doexe "${T}/${2}" |
3143 |
|
3144 |
Deleted: main/trunk/bin/newinitd |
3145 |
=================================================================== |
3146 |
--- main/trunk/bin/newinitd 2009-03-12 00:25:50 UTC (rev 13062) |
3147 |
+++ main/trunk/bin/newinitd 2009-03-12 00:28:45 UTC (rev 13063) |
3148 |
@@ -1,18 +0,0 @@ |
3149 |
-#!/bin/bash |
3150 |
-# Copyright 1999-2006 Gentoo Foundation |
3151 |
-# Distributed under the terms of the GNU General Public License v2 |
3152 |
-# $Id$ |
3153 |
- |
3154 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3155 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3156 |
- exit 1 |
3157 |
-fi |
3158 |
- |
3159 |
-if [ ! -e "$1" ] ; then |
3160 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3161 |
- exit 1 |
3162 |
-fi |
3163 |
- |
3164 |
-rm -rf "${T}/${2}" && \ |
3165 |
-cp -f "${1}" "${T}/${2}" && \ |
3166 |
-exec doinitd "${T}/${2}" |
3167 |
|
3168 |
Deleted: main/trunk/bin/newins |
3169 |
=================================================================== |
3170 |
--- main/trunk/bin/newins 2009-03-12 00:25:50 UTC (rev 13062) |
3171 |
+++ main/trunk/bin/newins 2009-03-12 00:28:45 UTC (rev 13063) |
3172 |
@@ -1,21 +0,0 @@ |
3173 |
-#!/bin/bash |
3174 |
-# Copyright 1999-2006 Gentoo Foundation |
3175 |
-# Distributed under the terms of the GNU General Public License v2 |
3176 |
-# $Id$ |
3177 |
- |
3178 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3179 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3180 |
- exit 1 |
3181 |
-fi |
3182 |
- |
3183 |
-if [ ! -e "$1" ] ; then |
3184 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3185 |
- exit 1 |
3186 |
-fi |
3187 |
- |
3188 |
-rm -rf "${T}/${2}" || exit $? |
3189 |
-cp -f "${1}" "${T}/${2}" || exit $? |
3190 |
-doins "${T}/${2}" |
3191 |
-ret=$? |
3192 |
-rm -rf "${T}/${2}" |
3193 |
-exit $ret |
3194 |
|
3195 |
Deleted: main/trunk/bin/newlib.a |
3196 |
=================================================================== |
3197 |
--- main/trunk/bin/newlib.a 2009-03-12 00:25:50 UTC (rev 13062) |
3198 |
+++ main/trunk/bin/newlib.a 2009-03-12 00:28:45 UTC (rev 13063) |
3199 |
@@ -1,18 +0,0 @@ |
3200 |
-#!/bin/bash |
3201 |
-# Copyright 1999-2006 Gentoo Foundation |
3202 |
-# Distributed under the terms of the GNU General Public License v2 |
3203 |
-# $Id$ |
3204 |
- |
3205 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3206 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3207 |
- exit 1 |
3208 |
-fi |
3209 |
- |
3210 |
-if [ ! -e "$1" ] ; then |
3211 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3212 |
- exit 1 |
3213 |
-fi |
3214 |
- |
3215 |
-rm -rf "${T}/${2}" && \ |
3216 |
-cp -f "${1}" "${T}/${2}" && \ |
3217 |
-exec dolib.a "${T}/${2}" |
3218 |
|
3219 |
Deleted: main/trunk/bin/newlib.so |
3220 |
=================================================================== |
3221 |
--- main/trunk/bin/newlib.so 2009-03-12 00:25:50 UTC (rev 13062) |
3222 |
+++ main/trunk/bin/newlib.so 2009-03-12 00:28:45 UTC (rev 13063) |
3223 |
@@ -1,18 +0,0 @@ |
3224 |
-#!/bin/bash |
3225 |
-# Copyright 1999-2006 Gentoo Foundation |
3226 |
-# Distributed under the terms of the GNU General Public License v2 |
3227 |
-# $Id$ |
3228 |
- |
3229 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3230 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3231 |
- exit 1 |
3232 |
-fi |
3233 |
- |
3234 |
-if [ ! -e "$1" ] ; then |
3235 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3236 |
- exit 1 |
3237 |
-fi |
3238 |
- |
3239 |
-rm -rf "${T}/${2}" && \ |
3240 |
-cp -f "${1}" "${T}/${2}" && \ |
3241 |
-exec dolib.so "${T}/${2}" |
3242 |
|
3243 |
Deleted: main/trunk/bin/newman |
3244 |
=================================================================== |
3245 |
--- main/trunk/bin/newman 2009-03-12 00:25:50 UTC (rev 13062) |
3246 |
+++ main/trunk/bin/newman 2009-03-12 00:28:45 UTC (rev 13063) |
3247 |
@@ -1,18 +0,0 @@ |
3248 |
-#!/bin/bash |
3249 |
-# Copyright 1999-2006 Gentoo Foundation |
3250 |
-# Distributed under the terms of the GNU General Public License v2 |
3251 |
-# $Id$ |
3252 |
- |
3253 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3254 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3255 |
- exit 1 |
3256 |
-fi |
3257 |
- |
3258 |
-if [ ! -e "$1" ] ; then |
3259 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3260 |
- exit 1 |
3261 |
-fi |
3262 |
- |
3263 |
-rm -rf "${T}/${2}" && \ |
3264 |
-cp -f "${1}" "${T}/${2}" && \ |
3265 |
-exec doman "${T}/${2}" |
3266 |
|
3267 |
Deleted: main/trunk/bin/newsbin |
3268 |
=================================================================== |
3269 |
--- main/trunk/bin/newsbin 2009-03-12 00:25:50 UTC (rev 13062) |
3270 |
+++ main/trunk/bin/newsbin 2009-03-12 00:28:45 UTC (rev 13063) |
3271 |
@@ -1,18 +0,0 @@ |
3272 |
-#!/bin/bash |
3273 |
-# Copyright 1999-2006 Gentoo Foundation |
3274 |
-# Distributed under the terms of the GNU General Public License v2 |
3275 |
-# $Id$ |
3276 |
- |
3277 |
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then |
3278 |
- echo "$0: Need two arguments, old file and new file" 1>&2 |
3279 |
- exit 1 |
3280 |
-fi |
3281 |
- |
3282 |
-if [ ! -e "$1" ] ; then |
3283 |
- echo "!!! ${0##*/}: $1 does not exist" 1>&2 |
3284 |
- exit 1 |
3285 |
-fi |
3286 |
- |
3287 |
-rm -rf "${T}/${2}" && \ |
3288 |
-cp -f "${1}" "${T}/${2}" && \ |
3289 |
-exec dosbin "${T}/${2}" |
3290 |
|
3291 |
Deleted: main/trunk/bin/prepall |
3292 |
=================================================================== |
3293 |
--- main/trunk/bin/prepall 2009-03-12 00:25:50 UTC (rev 13062) |
3294 |
+++ main/trunk/bin/prepall 2009-03-12 00:28:45 UTC (rev 13063) |
3295 |
@@ -1,24 +0,0 @@ |
3296 |
-#!/bin/bash |
3297 |
-# Copyright 1999-2007 Gentoo Foundation |
3298 |
-# Distributed under the terms of the GNU General Public License v2 |
3299 |
-# $Id$ |
3300 |
- |
3301 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3302 |
- |
3303 |
-if type -P chflags > /dev/null && type -P mtree > /dev/null ; then |
3304 |
- # Save all the file flags for restoration at the end of prepall. |
3305 |
- mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree" |
3306 |
- # Remove all the file flags so that prepall can do anything necessary. |
3307 |
- chflags -R noschg,nouchg,nosappnd,nouappnd "${D}" |
3308 |
- chflags -R nosunlnk,nouunlnk "${D}" 2>/dev/null |
3309 |
-fi |
3310 |
- |
3311 |
-prepallman |
3312 |
-prepallinfo |
3313 |
- |
3314 |
-prepallstrip |
3315 |
- |
3316 |
-if type -P chflags > /dev/null && type -P mtree > /dev/null; then |
3317 |
- # Restore all the file flags that were saved at the beginning of prepall. |
3318 |
- mtree -U -e -p "${D}" -k flags < "${T}/bsdflags.mtree" &> /dev/null |
3319 |
-fi |
3320 |
|
3321 |
Deleted: main/trunk/bin/prepalldocs |
3322 |
=================================================================== |
3323 |
--- main/trunk/bin/prepalldocs 2009-03-12 00:25:50 UTC (rev 13062) |
3324 |
+++ main/trunk/bin/prepalldocs 2009-03-12 00:28:45 UTC (rev 13063) |
3325 |
@@ -1,16 +0,0 @@ |
3326 |
-#!/bin/bash |
3327 |
-# Copyright 1999-2007 Gentoo Foundation |
3328 |
-# Distributed under the terms of the GNU General Public License v2 |
3329 |
-# $Id$ |
3330 |
- |
3331 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3332 |
- |
3333 |
-if [[ -n $1 ]] ; then |
3334 |
- vecho "${0##*/}: invalid usage; takes no arguments" 1>&2 |
3335 |
-fi |
3336 |
- |
3337 |
-cd "${D}" |
3338 |
-[[ -d usr/share/doc ]] || exit 0 |
3339 |
- |
3340 |
-ecompressdir --ignore /usr/share/doc/${PF}/html |
3341 |
-ecompressdir --queue /usr/share/doc |
3342 |
|
3343 |
Deleted: main/trunk/bin/prepallinfo |
3344 |
=================================================================== |
3345 |
--- main/trunk/bin/prepallinfo 2009-03-12 00:25:50 UTC (rev 13062) |
3346 |
+++ main/trunk/bin/prepallinfo 2009-03-12 00:28:45 UTC (rev 13063) |
3347 |
@@ -1,10 +0,0 @@ |
3348 |
-#!/bin/bash |
3349 |
-# Copyright 1999-2006 Gentoo Foundation |
3350 |
-# Distributed under the terms of the GNU General Public License v2 |
3351 |
-# $Id$ |
3352 |
- |
3353 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3354 |
- |
3355 |
-[[ ! -d ${D}usr/share/info ]] && exit 0 |
3356 |
- |
3357 |
-exec prepinfo |
3358 |
|
3359 |
Deleted: main/trunk/bin/prepallman |
3360 |
=================================================================== |
3361 |
--- main/trunk/bin/prepallman 2009-03-12 00:25:50 UTC (rev 13062) |
3362 |
+++ main/trunk/bin/prepallman 2009-03-12 00:28:45 UTC (rev 13063) |
3363 |
@@ -1,17 +0,0 @@ |
3364 |
-#!/bin/bash |
3365 |
-# Copyright 1999-2007 Gentoo Foundation |
3366 |
-# Distributed under the terms of the GNU General Public License v2 |
3367 |
-# $Id$ |
3368 |
- |
3369 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3370 |
- |
3371 |
-ret=0 |
3372 |
- |
3373 |
-find "${D}" -type d -name man > "${T}"/prepallman.filelist |
3374 |
-while read mandir ; do |
3375 |
- mandir=${mandir#${D}} |
3376 |
- prepman "${mandir%/man}" |
3377 |
- ((ret+=$?)) |
3378 |
-done < "${T}"/prepallman.filelist |
3379 |
- |
3380 |
-exit ${ret} |
3381 |
|
3382 |
Deleted: main/trunk/bin/prepallstrip |
3383 |
=================================================================== |
3384 |
--- main/trunk/bin/prepallstrip 2009-03-12 00:25:50 UTC (rev 13062) |
3385 |
+++ main/trunk/bin/prepallstrip 2009-03-12 00:28:45 UTC (rev 13063) |
3386 |
@@ -1,6 +0,0 @@ |
3387 |
-#!/bin/bash |
3388 |
-# Copyright 1999-2006 Gentoo Foundation |
3389 |
-# Distributed under the terms of the GNU General Public License v2 |
3390 |
-# $Id$ |
3391 |
- |
3392 |
-exec prepstrip "${D}" |
3393 |
|
3394 |
Deleted: main/trunk/bin/prepinfo |
3395 |
=================================================================== |
3396 |
--- main/trunk/bin/prepinfo 2009-03-12 00:25:50 UTC (rev 13062) |
3397 |
+++ main/trunk/bin/prepinfo 2009-03-12 00:28:45 UTC (rev 13063) |
3398 |
@@ -1,31 +0,0 @@ |
3399 |
-#!/bin/bash |
3400 |
-# Copyright 1999-2007 Gentoo Foundation |
3401 |
-# Distributed under the terms of the GNU General Public License v2 |
3402 |
-# $Id$ |
3403 |
- |
3404 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3405 |
- |
3406 |
-if [[ -z $1 ]] ; then |
3407 |
- infodir="/usr/share/info" |
3408 |
-else |
3409 |
- if [[ -d ${D}$1/share/info ]] ; then |
3410 |
- infodir="$1/share/info" |
3411 |
- else |
3412 |
- infodir="$1/info" |
3413 |
- fi |
3414 |
-fi |
3415 |
- |
3416 |
-if [[ ! -d ${D}${infodir} ]] ; then |
3417 |
- if [[ -n $1 ]] ; then |
3418 |
- vecho "${0##*/}: '${infodir}' does not exist!" |
3419 |
- exit 1 |
3420 |
- else |
3421 |
- exit 0 |
3422 |
- fi |
3423 |
-fi |
3424 |
- |
3425 |
-find "${D}${infodir}" -type d -print0 | while read -d $'\0' x ; do |
3426 |
- rm -f "${x}"/dir{,.info}{,.gz,.bz2} |
3427 |
-done |
3428 |
- |
3429 |
-exec ecompressdir --queue "${infodir}" |
3430 |
|
3431 |
Deleted: main/trunk/bin/preplib |
3432 |
=================================================================== |
3433 |
--- main/trunk/bin/preplib 2009-03-12 00:25:50 UTC (rev 13062) |
3434 |
+++ main/trunk/bin/preplib 2009-03-12 00:28:45 UTC (rev 13063) |
3435 |
@@ -1,29 +0,0 @@ |
3436 |
-#!/bin/bash |
3437 |
-# Copyright 1999-2006 Gentoo Foundation |
3438 |
-# Distributed under the terms of the GNU General Public License v2 |
3439 |
-# $Id$ |
3440 |
- |
3441 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3442 |
- |
3443 |
-eqawarn "QA Notice: Deprecated call to 'preplib'" |
3444 |
- |
3445 |
-LIBDIR_VAR="LIBDIR_${ABI}" |
3446 |
-if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then |
3447 |
- CONF_LIBDIR="${!LIBDIR_VAR}" |
3448 |
-fi |
3449 |
-unset LIBDIR_VAR |
3450 |
- |
3451 |
-if [ -z "${CONF_LIBDIR}" ]; then |
3452 |
- # we need this to default to lib so that things dont break |
3453 |
- CONF_LIBDIR="lib" |
3454 |
-fi |
3455 |
- |
3456 |
-if [ -z "$1" ] ; then |
3457 |
- z="${D}usr/${CONF_LIBDIR}" |
3458 |
-else |
3459 |
- z="${D}$1/${CONF_LIBDIR}" |
3460 |
-fi |
3461 |
- |
3462 |
-if [ -d "${z}" ] ; then |
3463 |
- ldconfig -n -N "${z}" |
3464 |
-fi |
3465 |
|
3466 |
Deleted: main/trunk/bin/prepman |
3467 |
=================================================================== |
3468 |
--- main/trunk/bin/prepman 2009-03-12 00:25:50 UTC (rev 13062) |
3469 |
+++ main/trunk/bin/prepman 2009-03-12 00:28:45 UTC (rev 13063) |
3470 |
@@ -1,30 +0,0 @@ |
3471 |
-#!/bin/bash |
3472 |
-# Copyright 1999-2007 Gentoo Foundation |
3473 |
-# Distributed under the terms of the GNU General Public License v2 |
3474 |
-# $Id$ |
3475 |
- |
3476 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3477 |
- |
3478 |
-if [[ -z $1 ]] ; then |
3479 |
- mandir="${D}usr/share/man" |
3480 |
-else |
3481 |
- mandir="${D}$1/man" |
3482 |
-fi |
3483 |
- |
3484 |
-if [[ ! -d ${mandir} ]] ; then |
3485 |
- eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${D}}'" |
3486 |
- exit 0 |
3487 |
-fi |
3488 |
- |
3489 |
-shopt -s nullglob |
3490 |
- |
3491 |
-really_is_mandir=0 |
3492 |
- |
3493 |
-# use some heuristics to test if this is a real mandir |
3494 |
-for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do |
3495 |
- [[ -d ${subdir} ]] && really_is_mandir=1 && break |
3496 |
-done |
3497 |
- |
3498 |
-[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --queue "${mandir#${D}}" |
3499 |
- |
3500 |
-exit 0 |
3501 |
|
3502 |
Deleted: main/trunk/bin/prepstrip |
3503 |
=================================================================== |
3504 |
--- main/trunk/bin/prepstrip 2009-03-12 00:25:50 UTC (rev 13062) |
3505 |
+++ main/trunk/bin/prepstrip 2009-03-12 00:28:45 UTC (rev 13063) |
3506 |
@@ -1,178 +0,0 @@ |
3507 |
-#!/bin/bash |
3508 |
-# Copyright 1999-2007 Gentoo Foundation |
3509 |
-# Distributed under the terms of the GNU General Public License v2 |
3510 |
-# $Id$ |
3511 |
- |
3512 |
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
3513 |
- |
3514 |
-banner=false |
3515 |
-SKIP_STRIP=false |
3516 |
-if hasq nostrip ${FEATURES} || \ |
3517 |
- hasq strip ${RESTRICT} |
3518 |
-then |
3519 |
- SKIP_STRIP=true |
3520 |
- banner=true |
3521 |
- hasq installsources ${FEATURES} || exit 0 |
3522 |
-fi |
3523 |
- |
3524 |
-STRIP=${STRIP:-${CHOST}-strip} |
3525 |
-type -P -- ${STRIP} > /dev/null || STRIP=strip |
3526 |
-OBJCOPY=${OBJCOPY:-${CHOST}-objcopy} |
3527 |
-type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy |
3528 |
- |
3529 |
-# We'll leave out -R .note for now until we can check out the relevance |
3530 |
-# of the section when it has the ALLOC flag set on it ... |
3531 |
-export SAFE_STRIP_FLAGS="--strip-unneeded" |
3532 |
-export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment} |
3533 |
- |
3534 |
-if hasq installsources ${FEATURES} && ! type -P debugedit >/dev/null ; then |
3535 |
- ewarn "FEATURES=installsources is enabled but the debugedit binary could not" |
3536 |
- ewarn "be found. This feature will not work unless debugedit is installed!" |
3537 |
-fi |
3538 |
- |
3539 |
-unset ${!INODE_*} |
3540 |
- |
3541 |
-inode_var_name() { |
3542 |
- if [[ $USERLAND = BSD ]] ; then |
3543 |
- stat -f 'INODE_%d_%i' "$1" |
3544 |
- else |
3545 |
- stat -c 'INODE_%d_%i' "$1" |
3546 |
- fi |
3547 |
-} |
3548 |
- |
3549 |
-save_elf_sources() { |
3550 |
- hasq installsources ${FEATURES} || return 0 |
3551 |
- hasq installsources ${RESTRICT} && return 0 |
3552 |
- type -P debugedit >/dev/null || return 0 |
3553 |
- |
3554 |
- local x=$1 |
3555 |
- local inode=$(inode_var_name "$x") |
3556 |
- [[ -n ${!inode} ]] && return 0 |
3557 |
- local sources_dir=/usr/src/debug/${CATEGORY}/${PF} |
3558 |
- debugedit -b "${WORKDIR}" -d "${sources_dir}" \ |
3559 |
- -l "${T}"/debug.sources "${x}" |
3560 |
- if [[ -s ${T}/debug.sources ]] ; then |
3561 |
- [[ -d ${D}${sources_dir} ]] || mkdir -p "${D}${sources_dir}" |
3562 |
- grep -zv '/<built-in>$' "${T}"/debug.sources | \ |
3563 |
- (cd "${WORKDIR}"; LANG=C sort -z -u | \ |
3564 |
- rsync -rtL0 --files-from=- "${WORKDIR}/" "${D}${sources_dir}/" ) |
3565 |
- fi |
3566 |
-} |
3567 |
- |
3568 |
-save_elf_debug() { |
3569 |
- hasq splitdebug ${FEATURES} || return 0 |
3570 |
- |
3571 |
- local x=$1 |
3572 |
- local y="${D}usr/lib/debug/${x:${#D}}.debug" |
3573 |
- |
3574 |
- # dont save debug info twice |
3575 |
- [[ ${x} == *".debug" ]] && return 0 |
3576 |
- |
3577 |
- # this will recompute the build-id, but for now that's ok |
3578 |
- local buildid="$( type -P debugedit >/dev/null && debugedit -i "${x}" )" |
3579 |
- |
3580 |
- mkdir -p $(dirname "${y}") |
3581 |
- |
3582 |
- local inode=$(inode_var_name "$x") |
3583 |
- if [[ -n ${!inode} ]] ; then |
3584 |
- ln "${D}usr/lib/debug/${!inode:${#D}}.debug" "$y" |
3585 |
- else |
3586 |
- eval $inode=\$x |
3587 |
- ${OBJCOPY} --only-keep-debug "${x}" "${y}" |
3588 |
- ${OBJCOPY} --add-gnu-debuglink="${y}" "${x}" |
3589 |
- [[ -g ${x} ]] && chmod go-r "${y}" |
3590 |
- [[ -u ${x} ]] && chmod go-r "${y}" |
3591 |
- chmod a-x,o-w "${y}" |
3592 |
- fi |
3593 |
- |
3594 |
- if [[ -n ${buildid} ]] ; then |
3595 |
- local buildid_dir="${D}usr/lib/debug/.build-id/${buildid:0:2}" |
3596 |
- local buildid_file="${buildid_dir}/${buildid:2}" |
3597 |
- mkdir -p "${buildid_dir}" |
3598 |
- ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug" |
3599 |
- ln -s "/${x:${#D}}" "${buildid_file}" |
3600 |
- fi |
3601 |
-} |
3602 |
- |
3603 |
-# The existance of the section .symtab tells us that a binary is stripped. |
3604 |
-# We want to log already stripped binaries, as this may be a QA violation. |
3605 |
-# They prevent us from getting the splitdebug data. |
3606 |
-if ! hasq binchecks ${RESTRICT} && \ |
3607 |
- ! hasq strip ${RESTRICT} ; then |
3608 |
- log=$T/scanelf-already-stripped.log |
3609 |
- scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^$D##" > "$log" |
3610 |
- if [[ -n $QA_PRESTRIPPED && -s $log && \ |
3611 |
- ${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then |
3612 |
- shopts=$- |
3613 |
- set -o noglob |
3614 |
- for x in $QA_PRESTRIPPED ; do |
3615 |
- sed -e "s#^${x#/}\$##" -i "$log" |
3616 |
- done |
3617 |
- set +o noglob |
3618 |
- set -$shopts |
3619 |
- fi |
3620 |
- sed -e "/^\$/d" -e "s#^#/#" -i "$log" |
3621 |
- if [[ -s $log ]] ; then |
3622 |
- vecho -e "\a\n" |
3623 |
- eqawarn "QA Notice: Pre-stripped files found:" |
3624 |
- eqawarn "$(<"$log")" |
3625 |
- else |
3626 |
- rm -f "$log" |
3627 |
- fi |
3628 |
-fi |
3629 |
- |
3630 |
-# Now we look for unstripped binaries. |
3631 |
-for x in \ |
3632 |
- $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \ |
3633 |
- $(find "$@" -type f -name '*.a') |
3634 |
-do |
3635 |
- if ! ${banner} ; then |
3636 |
- vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}" |
3637 |
- banner=true |
3638 |
- fi |
3639 |
- |
3640 |
- f=$(file "${x}") || continue |
3641 |
- [[ -z ${f} ]] && continue |
3642 |
- |
3643 |
- if ! ${SKIP_STRIP} ; then |
3644 |
- # The noglob funk is to support STRIP_MASK="/*/booga" and to keep |
3645 |
- # the for loop from expanding the globs. |
3646 |
- # The eval echo is to support STRIP_MASK="/*/{booga,bar}" sex. |
3647 |
- set -o noglob |
3648 |
- strip_this=true |
3649 |
- for m in $(eval echo ${STRIP_MASK}) ; do |
3650 |
- [[ /${x#${D}} == ${m} ]] && strip_this=false && break |
3651 |
- done |
3652 |
- set +o noglob |
3653 |
- else |
3654 |
- strip_this=false |
3655 |
- fi |
3656 |
- |
3657 |
- # only split debug info for final linked objects |
3658 |
- # or kernel modules as debuginfo for intermediatary |
3659 |
- # files (think crt*.o from gcc/glibc) is useless and |
3660 |
- # actually causes problems. install sources for all |
3661 |
- # elf types though cause that stuff is good. |
3662 |
- |
3663 |
- if [[ ${f} == *"current ar archive"* ]] ; then |
3664 |
- vecho " ${x:${#D}}" |
3665 |
- if ${strip_this} ; then |
3666 |
- # hmm, can we split debug/sources for .a ? |
3667 |
- ${STRIP} -g "${x}" |
3668 |
- fi |
3669 |
- elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then |
3670 |
- vecho " ${x:${#D}}" |
3671 |
- save_elf_sources "${x}" |
3672 |
- if ${strip_this} ; then |
3673 |
- save_elf_debug "${x}" |
3674 |
- ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}" |
3675 |
- fi |
3676 |
- elif [[ ${f} == *"SB relocatable"* ]] ; then |
3677 |
- vecho " ${x:${#D}}" |
3678 |
- save_elf_sources "${x}" |
3679 |
- if ${strip_this} ; then |
3680 |
- [[ ${x} == *.ko ]] && save_elf_debug "${x}" |
3681 |
- ${STRIP} ${SAFE_STRIP_FLAGS} "${x}" |
3682 |
- fi |
3683 |
- fi |
3684 |
-done |
3685 |
|
3686 |
Deleted: main/trunk/bin/sed |
3687 |
=================================================================== |
3688 |
--- main/trunk/bin/sed 2009-03-12 00:25:50 UTC (rev 13062) |
3689 |
+++ main/trunk/bin/sed 2009-03-12 00:28:45 UTC (rev 13063) |
3690 |
@@ -1,28 +0,0 @@ |
3691 |
-#!/bin/bash |
3692 |
-# Copyright 2007 Gentoo Foundation |
3693 |
-# Distributed under the terms of the GNU General Public License v2 |
3694 |
-# $Id$ |
3695 |
- |
3696 |
-scriptpath=${BASH_SOURCE[0]} |
3697 |
-scriptname=${scriptpath##*/} |
3698 |
- |
3699 |
-if [[ sed == ${scriptname} ]] && [[ -n ${ESED} ]]; then |
3700 |
- exec ${ESED} "$@" |
3701 |
-elif type -P g${scriptname} > /dev/null ; then |
3702 |
- exec g${scriptname} "$@" |
3703 |
-else |
3704 |
- old_IFS="${IFS}" |
3705 |
- IFS=":" |
3706 |
- |
3707 |
- for path in $PATH; do |
3708 |
- [[ ${path}/${scriptname} == ${scriptpath} ]] && continue |
3709 |
- if [[ -x ${path}/${scriptname} ]]; then |
3710 |
- exec ${path}/${scriptname} "$@" |
3711 |
- exit 0 |
3712 |
- fi |
3713 |
- done |
3714 |
- |
3715 |
- IFS="${old_IFS}" |
3716 |
-fi |
3717 |
- |
3718 |
-exit 1 |
3719 |
|
3720 |
Modified: main/trunk/pym/portage/tests/bin/setup_env.py |
3721 |
=================================================================== |
3722 |
--- main/trunk/pym/portage/tests/bin/setup_env.py 2009-03-12 00:25:50 UTC (rev 13062) |
3723 |
+++ main/trunk/pym/portage/tests/bin/setup_env.py 2009-03-12 00:28:45 UTC (rev 13063) |
3724 |
@@ -9,7 +9,8 @@ |
3725 |
from portage.process import spawn |
3726 |
from portage.const import PORTAGE_BIN_PATH |
3727 |
|
3728 |
-bindir = join(dirname(dirname(abspath(__file__))), "..", "..", "..", "bin") |
3729 |
+bindir = join(dirname(dirname(abspath(__file__))), |
3730 |
+ "..", "..", "..", "bin", "ebuild-helpers") |
3731 |
basedir = join(dirname(dirname(abspath(__file__))), "bin", "root") |
3732 |
os.environ["D"] = os.path.join(basedir, "image") |
3733 |
os.environ["T"] = os.path.join(basedir, "temp") |