Simplify oe_filter and oe_filter_out by using the filter() python function.
[vuplus_openembedded] / classes / base.oeclass
1 PATCHES_DIR="${S}"
2
3 def base_dep_prepend(d):
4         import oe;
5         #
6         # Ideally this will check a flag so we will operate properly in
7         # the case where host == build == target, for now we don't work in
8         # that case though.
9         #
10         deps = ""
11         if not oe.data.getVar('INHIBIT_DEFAULT_DEPS', d):
12                 deps += "patcher-native"
13                 if (oe.data.getVar('HOST_SYS', d, 1) !=
14                     oe.data.getVar('BUILD_SYS', d, 1)):
15                         deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
16         return deps
17
18 def base_read_file(filename):
19         import oe
20         try:
21                 f = file( filename, "r" )
22         except IOError, reason:
23                 raise oe.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason))
24         else:
25                 return f.read().strip()
26         return None
27
28 DEPENDS_prepend="${@base_dep_prepend(d)} "
29
30 def base_set_filespath(path, d):
31         import os, oe
32         filespath = []
33         for p in path:
34                 overrides = oe.data.getVar("OVERRIDES", d, 1) or ""
35                 overrides = overrides + ":"
36                 for o in overrides.split(":"):
37                         filespath.append(os.path.join(p, o))
38         oe.data.setVar("FILESPATH", ":".join(filespath), d)
39
40 FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
41
42 def oe_filter(f, str, d):
43         from re import match
44         return " ".join(filter(lambda x: match(f, x, 0), str.split()))
45
46 def oe_filter_out(f, str, d):
47         from re import match
48         return " ".join(filter(lambda x: not match(f, x, 0), str.split()))
49
50 die() {
51         oefatal "$*"
52 }
53
54 oenote() {
55         echo "NOTE:" "$*"
56 }
57
58 oewarn() {
59         echo "WARNING:" "$*"
60 }
61
62 oefatal() {
63         echo "FATAL:" "$*"
64         exit 1
65 }
66
67 oedebug() {
68         test $# -ge 2 || {
69                 echo "Usage: oedebug level \"message\""
70                 exit 1
71         }
72
73         test ${OEDEBUG:-0} -ge $1 && {
74                 shift
75                 echo "DEBUG:" $*
76         }
77 }
78
79 oe_runmake() {
80         if [ x"$MAKE" = x ]; then MAKE=make; fi
81         oenote ${MAKE} ${EXTRA_OEMAKE} "$@"
82         ${MAKE} ${EXTRA_OEMAKE} "$@" || die "oemake failed"
83 }
84
85 oe_soinstall() {
86         # Purpose: Install shared library file and
87         #          create the necessary links
88         # Example:
89         #
90         # oe_
91         #
92         #oenote installing shared library $1 to $2
93         #
94         libname=`basename $1`
95         install -m 755 $1 $2/$libname
96         sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
97         solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
98         ln -sf $libname $2/$sonamelink
99         ln -sf $libname $2/$solink
100 }
101
102 oe_libinstall() {
103         # Purpose: Install a library, in all its forms
104         # Example
105         #
106         # oe_libinstall libltdl ${STAGING_LIBDIR}/
107         # oe_libinstall -C src/libblah libblah ${D}/${libdir}/
108         dir=""
109         libtool=""
110         while [ "$#" -gt 0 ]; do
111                 case "$1" in
112                 -C)
113                         shift
114                         dir="$1"
115                         ;;
116                 -s)
117                         silent=1
118                         ;;
119                 -a)
120                         require_static=1
121                         ;;
122                 -so)
123                         require_shared=1
124                         ;;
125                 -*)
126                         oefatal "oe_libinstall: unknown option: $1"
127                         ;;
128                 *)
129                         break;
130                         ;;
131                 esac
132                 shift
133         done
134
135         libname="$1"
136         shift
137         destpath="$1"
138         if [ -z "$destpath" ]; then
139                 oefatal "oe_libinstall: no destination path specified"
140         fi
141
142         __runcmd () {
143                 if [ -z "$silent" ]; then
144                         echo >&2 "oe_libinstall: $*"
145                 fi
146                 $*
147         }
148
149         if [ -z "$dir" ]; then
150                 dir=`pwd`
151         fi
152         if [ -d "$dir/.libs" ]; then
153                 dir=$dir/.libs
154         fi
155         olddir=`pwd`
156         __runcmd cd $dir
157
158         lafile=$libname.la
159         if [ -f "$lafile" ]; then
160                 # libtool archive
161                 eval `cat $lafile|grep "^library_names="`
162                 libtool=1
163         else
164                 library_names="$libname.so* $libname.dll.a"
165         fi
166
167         __runcmd install -d $destpath/
168         dota=$libname.a
169         if [ -f "$dota" -o -n "$require_static" ]; then
170                 __runcmd install -m 0644 $dota $destpath/
171         fi
172         dotlai=$libname.lai
173         if [ -f "$dotlai" -o -n "$libtool" ]; then
174                 __runcmd install -m 0644 $dotlai $destpath/$libname.la
175         fi
176
177         for name in $library_names; do
178                 files=`eval echo $name`
179                 for f in $files; do
180                         if [ ! -e "$f" ]; then
181                                 if [ -n "$libtool" ]; then
182                                         oefatal "oe_libinstall: $dir/$f not found."
183                                 fi
184                         elif [ -L "$f" ]; then
185                                 __runcmd cp -P "$f" $destpath/
186                         elif [ ! -L "$f" ]; then
187                                 libfile="$f"
188                                 __runcmd install -m 0755 $libfile $destpath/
189                         fi
190                 done
191         done
192
193         if [ -z "$libfile" ]; then
194                 if  [ -n "$require_shared" ]; then
195                         oefatal "oe_libinstall: unable to locate shared library"
196                 fi
197         elif [ -z "$libtool" ]; then
198                 # special case hack for non-libtool .so.#.#.# links
199                 baselibfile=`basename "$libfile"`
200                 if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
201                         sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
202                         solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
203                         if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
204                                 __runcmd ln -sf $baselibfile $destpath/$sonamelink
205                         fi
206                         __runcmd ln -sf $baselibfile $destpath/$solink
207                 fi
208         fi
209
210         __runcmd cd "$olddir"
211 }
212
213 oe_machinstall() {
214         # Purpose: Install machine dependent files, if available
215         #          If not available, check if there is a default
216         #          If no default, just touch the destination
217         # Example:
218         #                $1  $2   $3         $4
219         # oe_machinstall -m 0644 fstab ${D}/etc/fstab
220         #
221         # TODO: Check argument number?
222         #
223         filename=`basename $3`
224         dirname=`dirname $3`
225
226         for o in `echo ${OVERRIDES} | tr ':' ' '`; do
227                 if [ -e $dirname/$o/$filename ]; then
228                         oenote $dirname/$o/$filename present, installing to $4
229                         install $1 $2 $dirname/$o/$filename $4
230                         return
231                 fi
232         done
233 #       oenote overrides specific file NOT present, trying default=$3...
234         if [ -e $3 ]; then
235                 oenote $3 present, installing to $4
236                 install $1 $2 $3 $4
237         else
238                 oenote $3 NOT present, touching empty $4
239                 touch $4
240         fi
241 }
242
243 addtask showdata
244 do_showdata[nostamp] = "1"
245 python do_showdata() {
246         import sys
247         # emit variables and shell functions
248         oe.data.emit_env(sys.__stdout__, d, True)
249         # emit the metadata which isnt valid shell
250         for e in d.keys():
251                 if oe.data.getVarFlag(e, 'python', d):
252                         sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
253                 elif oe.data.getVarFlag(e, 'func', d):
254                         sys.__stdout__.write("\n%s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
255                 else:
256                         sys.__stdout__.write("%s=%s\n" % (e, oe.data.getVar(e, d, 1)))
257 }
258
259 addtask listtasks
260 do_listtasks[nostamp] = "1"
261 python do_listtasks() {
262         import sys
263         # emit variables and shell functions
264         #oe.data.emit_env(sys.__stdout__, d)
265         # emit the metadata which isnt valid shell
266         for e in d.keys():
267                 if oe.data.getVarFlag(e, 'task', d):
268                         sys.__stdout__.write("%s\n" % e)
269 }
270
271 addtask clean
272 do_clean[dirs] = "${TOPDIR}"
273 do_clean[nostamp] = "1"
274 python base_do_clean() {
275         """clear the build and temp directories"""
276         dir = oe.data.expand("${WORKDIR}", d)
277         if dir == '//': raise oe.build.FuncFailed("wrong DATADIR")
278         oe.note("removing " + dir)
279         os.system('rm -rf ' + dir)
280
281         dir = "%s.*" % oe.data.expand(oe.data.getVar('STAMP', d), d)
282         oe.note("removing " + dir)
283         os.system('rm -f '+ dir)
284 }
285
286 addtask mrproper
287 do_mrproper[dirs] = "${TOPDIR}"
288 do_mrproper[nostamp] = "1"
289 python base_do_mrproper() {
290         """clear downloaded sources, build and temp directories"""
291         dir = oe.data.expand("${DL_DIR}", d)
292         if dir == '/': oe.build.FuncFailed("wrong DATADIR")
293         oe.debug(2, "removing " + dir)
294         os.system('rm -rf ' + dir)
295         oe.build.exec_task('do_clean', d)
296 }
297
298 addtask patch after do_unpack
299 do_patch[dirs] = "${WORKDIR}"
300 python base_do_patch() {
301         import re
302
303         src_uri = oe.data.getVar('SRC_URI', d)
304         if not src_uri:
305                 return
306         src_uri = oe.data.expand(src_uri, d)
307         for url in src_uri.split():
308 #               oe.note('url is %s' % url)
309                 (type, host, path, user, pswd, parm) = oe.decodeurl(url)
310                 if not "patch" in parm:
311                         continue
312                 from oe.fetch import init, localpath
313                 init([url])
314                 url = oe.encodeurl((type, host, path, user, pswd, []))
315                 local = '/' + localpath(url, d)
316                 # patch!
317                 dots = local.split(".")
318                 if dots[-1] in ['gz', 'bz2', 'Z']:
319                         efile = os.path.join(oe.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1])))
320                 else:
321                         efile = local
322                 efile = oe.data.expand(efile, d)
323                 patches_dir = oe.data.expand(oe.data.getVar('PATCHES_DIR', d), d)
324                 oe.mkdirhier(patches_dir)
325                 os.chdir(patches_dir)
326                 cmd = "PATH=\"%s\" patcher" % oe.data.getVar("PATH", d, 1)
327                 if "pnum" in parm:
328                         cmd += " -p %s" % parm["pnum"]
329                 cmd += " -R -n \"%s\" -i %s" % (os.path.basename(efile), efile)
330                 ret = os.system(cmd)
331                 if ret != 0:
332                         raise oe.build.FuncFailed("'patcher' execution failed")
333 }
334
335 addtask fetch
336 do_fetch[dirs] = "${DL_DIR}"
337 do_fetch[nostamp] = "1"
338 python base_do_fetch() {
339         import sys, copy
340
341         localdata = copy.deepcopy(d)
342         oe.data.update_data(localdata)
343
344         src_uri = oe.data.getVar('SRC_URI', localdata, 1)
345         if not src_uri:
346                 return 1
347
348         try:
349                 oe.fetch.init(src_uri.split())
350         except oe.fetch.NoMethodError:
351                 (type, value, traceback) = sys.exc_info()
352                 raise oe.build.FuncFailed("No method: %s" % value)
353
354         try:
355                 oe.fetch.go(localdata)
356         except oe.fetch.MissingParameterError:
357                 (type, value, traceback) = sys.exc_info()
358                 raise oe.build.FuncFailed("Missing parameters: %s" % value)
359         except oe.fetch.FetchError:
360                 (type, value, traceback) = sys.exc_info()
361                 raise oe.build.FuncFailed("Fetch failed: %s" % value)
362 }
363
364 addtask unpack after do_fetch
365 do_unpack[dirs] = "${WORKDIR}"
366 python base_do_unpack() {
367         import re, copy, os
368
369         localdata = copy.deepcopy(d)
370         oe.data.update_data(localdata)
371
372         src_uri = oe.data.getVar('SRC_URI', localdata)
373         if not src_uri:
374                 return
375         src_uri = oe.data.expand(src_uri, localdata)
376         for url in src_uri.split():
377                 try:
378                         local = oe.data.expand(oe.fetch.localpath(url, localdata), localdata)
379                 except oe.MalformedUrl, e:
380                         raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
381                 # dont need any parameters for extraction, strip them off
382                 local = re.sub(';.*$', '', local)
383                 local = os.path.realpath(local)
384                 dots = local.split(".")
385                 if dots[-1] in ['gz', 'bz2', 'Z']:
386                         efile = os.path.join(oe.data.getVar('WORKDIR', localdata, 1),os.path.basename('.'.join(dots[0:-1])))
387                 else:
388                         efile = local
389                 cmd = None
390                 if local.endswith('.tar'):
391                         cmd = 'tar x --no-same-owner -f %s' % local
392                 elif local.endswith('.tgz') or local.endswith('.tar.gz'):
393                         cmd = 'tar xz --no-same-owner -f %s' % local
394                 elif local.endswith('.tbz') or local.endswith('.tar.bz2'):
395                         cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % local
396                 elif local.endswith('.gz') or local.endswith('.Z') or local.endswith('.z'):
397                         loc = local.rfind('.')
398                         cmd = 'gzip -dc %s > %s' % (local, efile)
399                 elif local.endswith('.bz2'):
400                         loc = local.rfind('.')
401                         cmd = 'bzip2 -dc %s > %s' % (local, efile)
402                 elif local.endswith('.zip'):
403                         loc = local.rfind('.')
404                         cmd = 'unzip -q %s' % local
405                 elif os.path.isdir(local):
406                         filesdir = os.path.realpath(oe.data.getVar("FILESDIR", localdata, 1))
407                         destdir = "."
408                         if local[0:len(filesdir)] == filesdir:
409                                 destdir = local[len(filesdir):local.rfind('/')]
410                                 destdir = destdir.strip('/')
411                                 if len(destdir) < 1:
412                                         destdir = "."
413                                 elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK):
414                                         os.makedirs("%s/%s" % (os.getcwd(), destdir))
415                         cmd = 'cp -a %s %s/%s/' % (local, os.getcwd(), destdir)
416                 else:
417                         (type, host, path, user, pswd, parm) = oe.decodeurl(url)
418                         if not 'patch' in parm:
419                                 destdir = oe.decodeurl(url)[1] or "."
420                                 oe.mkdirhier("%s/%s" % (os.getcwd(), destdir))
421                                 cmd = 'cp %s %s/%s/' % (local, os.getcwd(), destdir)
422                 if not cmd:
423                         continue
424                 oe.note("Unpacking %s to %s/" % (local, os.getcwd()))
425                 ret = os.system(cmd)
426                 if ret != 0:
427                         raise oe.build.FuncFailed("%s execution failed" % cmd)
428 }
429
430 addhandler base_eventhandler
431 python base_eventhandler() {
432         from oe import note, error, data
433         from oe.event import Handled, NotHandled, getName
434         import os
435
436         name = getName(e)
437         if name in ["PkgSucceeded"]:
438                 note("package %s: build completed" % e.pkg)
439         if name in ["PkgStarted"]:
440                 note("package %s: build %s" % (e.pkg, name[3:].lower()))
441         elif name in ["PkgFailed"]:
442                 error("package %s: build %s" % (e.pkg, name[3:].lower()))
443         elif name in ["TaskStarted"]:
444                 note("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
445         elif name in ["TaskSucceeded"]:
446                 note("package %s: task %s completed" % (data.expand(data.getVar("PF", e.data), e.data), e.task))
447         elif name in ["TaskFailed"]:
448                 error("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
449         elif name in ["UnsatisfiedDep"]:
450                 note("package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()))
451         elif name in ["BuildStarted", "BuildCompleted"]:
452                 note("build %s %s" % (e.name, name[5:].lower()))
453         return NotHandled
454 }
455
456 addtask configure after do_unpack do_patch
457 do_configure[dirs] = "${S} ${B}"
458
459 base_do_configure() {
460         :
461 }
462
463 addtask compile after do_configure
464 do_compile[dirs] = "${S} ${B}"
465 base_do_compile() {
466         if [ -e Makefile -o -e makefile ]; then
467                 oe_runmake || die "make failed"
468         else
469                 oenote "nothing to compile"
470         fi
471 }
472
473
474 addtask stage after do_compile
475 base_do_stage () {
476         :
477 }
478
479 do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${TARGET_SYS}/lib \
480                              ${STAGING_DIR}/${TARGET_SYS}/include \
481                              ${STAGING_DIR}/${BUILD_SYS}/bin ${STAGING_DIR}/${BUILD_SYS}/lib \
482                              ${STAGING_DIR}/${BUILD_SYS}/include \
483                              ${STAGING_DATADIR} \
484                              ${S} ${B}"
485
486 addtask populate_staging after do_compile
487
488 #python do_populate_staging () {
489 #       if not oe.data.getVar('manifest', d):
490 #               oe.build.exec_func('do_emit_manifest', d)
491 #       if oe.data.getVar('do_stage', d):
492 #               oe.build.exec_func('do_stage', d)
493 #       else:
494 #               oe.build.exec_func('manifest_do_populate_staging', d)
495 #}
496
497 python do_populate_staging () {
498         if oe.data.getVar('manifest_do_populate_staging', d):
499                 oe.build.exec_func('manifest_do_populate_staging', d)
500         else:
501                 oe.build.exec_func('do_stage', d)
502 }
503
504 #addtask install
505 addtask install after do_compile
506 do_install[dirs] = "${S} ${B}"
507
508 base_do_install() {
509         :
510 }
511
512 #addtask populate_pkgs after do_compile
513 #python do_populate_pkgs () {
514 #       if not oe.data.getVar('manifest', d):
515 #               oe.build.exec_func('do_emit_manifest', d)
516 #       oe.build.exec_func('manifest_do_populate_pkgs', d)
517 #       oe.build.exec_func('package_do_shlibs', d)
518 #}
519
520 base_do_package() {
521         :
522 }
523
524 addtask build after do_populate_staging
525 do_build = ""
526 do_build[nostamp] = "1"
527 do_build[func] = "1"
528
529 # Functions that update metadata based on files outputted
530 # during the build process.
531
532 SHLIBS = ""
533 RDEPENDS_prepend = " ${SHLIBS}"
534
535 python read_manifest () {
536         import sys
537         mfn = oe.data.getVar("MANIFEST", d, 1)
538         if os.access(mfn, os.R_OK):
539                 # we have a manifest, so emit do_stage and do_populate_pkgs,
540                 # and stuff some additional bits of data into the metadata store
541                 mfile = file(mfn, "r")
542                 manifest = oe.manifest.parse(mfile, d)
543                 if not manifest:
544                         return
545
546                 oe.data.setVar('manifest', manifest, d)
547 }
548
549 python parse_manifest () {
550                 manifest = oe.data.getVar("manifest", d)
551                 if not manifest:
552                         return
553                 for func in ("do_populate_staging", "do_populate_pkgs"):
554                         value = oe.manifest.emit(func, manifest, d)
555                         if value:
556                                 oe.data.setVar("manifest_" + func, value, d)
557                                 oe.data.delVarFlag("manifest_" + func, "python", d)
558                                 oe.data.delVarFlag("manifest_" + func, "fakeroot", d)
559                                 oe.data.setVarFlag("manifest_" + func, "func", 1, d)
560                 packages = []
561                 for l in manifest:
562                         if "pkg" in l and l["pkg"] is not None:
563                                 packages.append(l["pkg"])
564                 oe.data.setVar("PACKAGES", " ".join(packages), d)
565 }
566
567 def explode_deps(s):
568         r = []
569         l = s.split()
570         flag = False
571         for i in l:
572                 if i[0] == '(':
573                         flag = True
574                         j = []
575                 if flag:
576                         j.append(i)
577                         if i.endswith(')'):
578                                 flag = False
579                                 r[-1] += ' ' + ' '.join(j)
580                 else:
581                         r.append(i)
582         return r
583
584 python read_shlibdeps () {
585         packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
586         for pkg in packages:
587                 rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 0) or oe.data.getVar('RDEPENDS', d, 0) or "")
588                 shlibsfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".shlibdeps", d)
589                 if os.access(shlibsfile, os.R_OK):
590                         fd = file(shlibsfile)
591                         lines = fd.readlines()
592                         fd.close()
593                         for l in lines:
594                                 rdepends.append(l.rstrip())
595                 pcfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".pcdeps", d)
596                 if os.access(pcfile, os.R_OK):
597                         fd = file(pcfile)
598                         lines = fd.readlines()
599                         fd.close()
600                         for l in lines:
601                                 rdepends.append(l.rstrip())
602                 oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
603 }
604
605 python read_subpackage_metadata () {
606         import re
607
608         def decode(str):
609                 import codecs
610                 c = codecs.getdecoder("string_escape")
611                 return c(str)[0]
612
613         data_file = oe.data.expand("${WORKDIR}/install/${PN}.package", d)
614         if os.access(data_file, os.R_OK):
615                 f = file(data_file, 'r')
616                 lines = f.readlines()
617                 f.close()
618                 r = re.compile("([^:]+):\s*(.*)")
619                 for l in lines:
620                         m = r.match(l)
621                         if m:
622                                 oe.data.setVar(m.group(1), decode(m.group(2)), d)
623 }
624
625 python __anonymous () {
626         need_host = oe.data.getVar('COMPATIBLE_HOST', d, 1)
627         if need_host:
628                 import re
629                 this_host = oe.data.getVar('HOST_SYS', d, 1)
630                 if not re.match(need_host, this_host):
631                         raise oe.parse.SkipPackage("incompatible with host %s" % this_host)
632         
633         pn = oe.data.getVar('PN', d, 1)
634         cvsdate = oe.data.getVar('CVSDATE_%s' % pn, d, 1)
635         if cvsdate != None:
636                 oe.data.setVar('CVSDATE', cvsdate, d)
637
638         try:
639                 oe.build.exec_func('read_manifest', d)
640                 oe.build.exec_func('parse_manifest', d)
641                 oe.build.exec_func('read_shlibdeps', d)
642                 oe.build.exec_func('read_subpackage_metadata', d)
643         except Exception, e:
644                 oe.error("anonymous function: %s" % e)
645                 pass
646 }
647
648 addtask emit_manifest
649 python do_emit_manifest () {
650 #       FIXME: emit a manifest here
651 #       1) adjust PATH to hit the wrapper scripts
652         wrappers = oe.which(oe.data.getVar("OEPATH", d, 1), 'build/install', 0)
653         path = (oe.data.getVar('PATH', d, 1) or '').split(':')
654         path.insert(0, os.path.dirname(wrappers))
655         oe.data.setVar('PATH', ':'.join(path), d)
656 #       2) exec_func("do_install", d)
657         oe.build.exec_func('do_install', d)
658 #       3) read in data collected by the wrappers
659         oe.build.exec_func('read_manifest', d)
660 #       4) mangle the manifest we just generated, get paths back into
661 #          our variable form
662 #       5) write it back out
663 #       6) re-parse it to ensure the generated functions are proper
664         oe.build.exec_func('parse_manifest', d)
665 }
666
667 EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_patch do_populate_pkgs do_stage
668
669 MIRRORS[func] = "0"
670 MIRRORS () {
671 ${DEBIAN_MIRROR}/main   http://snapshot.debian.net/archive/pool
672 ${DEBIAN_MIRROR}        ftp://ftp.de.debian.org/debian/pool
673 ${DEBIAN_MIRROR}        ftp://ftp.au.debian.org/debian/pool
674 ${DEBIAN_MIRROR}        ftp://ftp.cl.debian.org/debian/pool
675 ${DEBIAN_MIRROR}        ftp://ftp.hr.debian.org/debian/pool
676 ${DEBIAN_MIRROR}        ftp://ftp.fi.debian.org/debian/pool
677 ${DEBIAN_MIRROR}        ftp://ftp.hk.debian.org/debian/pool
678 ${DEBIAN_MIRROR}        ftp://ftp.hu.debian.org/debian/pool
679 ${DEBIAN_MIRROR}        ftp://ftp.ie.debian.org/debian/pool
680 ${DEBIAN_MIRROR}        ftp://ftp.it.debian.org/debian/pool
681 ${DEBIAN_MIRROR}        ftp://ftp.jp.debian.org/debian/pool
682 ${DEBIAN_MIRROR}        ftp://ftp.no.debian.org/debian/pool
683 ${DEBIAN_MIRROR}        ftp://ftp.pl.debian.org/debian/pool
684 ${DEBIAN_MIRROR}        ftp://ftp.ro.debian.org/debian/pool
685 ${DEBIAN_MIRROR}        ftp://ftp.si.debian.org/debian/pool
686 ${DEBIAN_MIRROR}        ftp://ftp.es.debian.org/debian/pool
687 ${DEBIAN_MIRROR}        ftp://ftp.se.debian.org/debian/pool
688 ${DEBIAN_MIRROR}        ftp://ftp.tr.debian.org/debian/pool
689 ${GNU_MIRROR}   ftp://mirrors.kernel.org/gnu
690 ${GNU_MIRROR}   ftp://ftp.matrix.com.br/pub/gnu
691 ${GNU_MIRROR}   ftp://ftp.cs.ubc.ca/mirror2/gnu
692 ${GNU_MIRROR}   ftp://sunsite.ust.hk/pub/gnu
693 ${GNU_MIRROR}   ftp://ftp.ayamura.org/pub/gnu
694 ftp://ftp.kernel.org/pub        http://www.kernel.org/pub
695 ftp://ftp.kernel.org/pub        ftp://ftp.us.kernel.org/pub
696 ftp://ftp.kernel.org/pub        ftp://ftp.uk.kernel.org/pub
697 ftp://ftp.kernel.org/pub        ftp://ftp.hk.kernel.org/pub
698 ftp://ftp.kernel.org/pub        ftp://ftp.au.kernel.org/pub
699 ftp://ftp.kernel.org/pub        ftp://ftp.jp.kernel.org/pub
700 ftp://.*/.*/    http://treke.net/oe/source/
701 http://.*/.*/   http://treke.net/oe/source/
702 }
703