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