2 python read_manifest () {
4 mfn = bb.data.getVar("MANIFEST", d, 1)
5 if os.access(mfn, os.R_OK):
6 # we have a manifest, so emit do_stage and do_populate_pkgs,
7 # and stuff some additional bits of data into the metadata store
9 manifest = bb.manifest.parse(mfile, d)
13 bb.data.setVar('manifest', manifest, d)
16 python parse_manifest () {
17 manifest = bb.data.getVar("manifest", d)
20 for func in ("do_populate_staging", "do_populate_pkgs"):
21 value = bb.manifest.emit(func, manifest, d)
23 bb.data.setVar("manifest_" + func, value, d)
24 bb.data.delVarFlag("manifest_" + func, "python", d)
25 bb.data.delVarFlag("manifest_" + func, "fakeroot", d)
26 bb.data.setVarFlag("manifest_" + func, "func", 1, d)
29 if "pkg" in l and l["pkg"] is not None:
30 packages.append(l["pkg"])
31 bb.data.setVar("PACKAGES", " ".join(packages), d)
34 python __anonymous () {
36 bb.build.exec_func('read_manifest', d)
37 bb.build.exec_func('parse_manifest', d)
38 except exceptions.KeyboardInterrupt:
41 bb.error("anonymous function: %s" % e)
45 #python do_populate_staging () {
46 # if not bb.data.getVar('manifest', d):
47 # bb.build.exec_func('do_emit_manifest', d)
48 # if bb.data.getVar('do_stage', d):
49 # bb.build.exec_func('do_stage', d)
51 # bb.build.exec_func('manifest_do_populate_staging', d)
54 #addtask populate_pkgs after do_compile
55 #python do_populate_pkgs () {
56 # if not bb.data.getVar('manifest', d):
57 # bb.build.exec_func('do_emit_manifest', d)
58 # bb.build.exec_func('manifest_do_populate_pkgs', d)
59 # bb.build.exec_func('package_do_shlibs', d)
63 python do_emit_manifest () {
64 # FIXME: emit a manifest here
65 # 1) adjust PATH to hit the wrapper scripts
66 wrappers = bb.which(bb.data.getVar("BBPATH", d, 1), 'build/install', 0)
67 path = (bb.data.getVar('PATH', d, 1) or '').split(':')
68 path.insert(0, os.path.dirname(wrappers))
69 bb.data.setVar('PATH', ':'.join(path), d)
70 # 2) exec_func("do_install", d)
71 bb.build.exec_func('do_install', d)
72 # 3) read in data collected by the wrappers
73 print("Got here2 213")
74 bb.build.exec_func('read_manifest', d)
75 # 4) mangle the manifest we just generated, get paths back into
77 # 5) write it back out
78 # 6) re-parse it to ensure the generated functions are proper
79 bb.build.exec_func('parse_manifest', d)