diff options
author | Richard Purdie <richard@openedhand.com> | 2006-05-26 11:27:03 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-05-26 11:27:03 +0000 |
commit | 3ed0468a0f058c690bd5de9657aeacf4b35ae42e (patch) | |
tree | f465289e4c6c020f25bbc0258eda3dd929d615d8 /openembedded | |
parent | 88a2a44bbaa6ee842333b99bf93c2a9cd25f90c0 (diff) | |
download | poky-3ed0468a0f058c690bd5de9657aeacf4b35ae42e.tar.gz |
Remove manifest code from base.bbclass, fixing the error shown by the puzzles .bb file
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@425 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded')
-rw-r--r-- | openembedded/classes/base.bbclass | 84 | ||||
-rw-r--r-- | openembedded/classes/manifest.bbclass | 80 |
2 files changed, 81 insertions, 83 deletions
diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass index 5f0e0d2fce..1b31d43450 100644 --- a/openembedded/classes/base.bbclass +++ b/openembedded/classes/base.bbclass | |||
@@ -579,23 +579,10 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T | |||
579 | 579 | ||
580 | addtask populate_staging after do_compile | 580 | addtask populate_staging after do_compile |
581 | 581 | ||
582 | #python do_populate_staging () { | ||
583 | # if not bb.data.getVar('manifest', d): | ||
584 | # bb.build.exec_func('do_emit_manifest', d) | ||
585 | # if bb.data.getVar('do_stage', d): | ||
586 | # bb.build.exec_func('do_stage', d) | ||
587 | # else: | ||
588 | # bb.build.exec_func('manifest_do_populate_staging', d) | ||
589 | #} | ||
590 | |||
591 | python do_populate_staging () { | 582 | python do_populate_staging () { |
592 | if bb.data.getVar('manifest_do_populate_staging', d): | 583 | bb.build.exec_func('do_stage', d) |
593 | bb.build.exec_func('manifest_do_populate_staging', d) | ||
594 | else: | ||
595 | bb.build.exec_func('do_stage', d) | ||
596 | } | 584 | } |
597 | 585 | ||
598 | #addtask install | ||
599 | addtask install after do_compile | 586 | addtask install after do_compile |
600 | do_install[dirs] = "${S} ${B}" | 587 | do_install[dirs] = "${S} ${B}" |
601 | 588 | ||
@@ -603,14 +590,6 @@ base_do_install() { | |||
603 | : | 590 | : |
604 | } | 591 | } |
605 | 592 | ||
606 | #addtask populate_pkgs after do_compile | ||
607 | #python do_populate_pkgs () { | ||
608 | # if not bb.data.getVar('manifest', d): | ||
609 | # bb.build.exec_func('do_emit_manifest', d) | ||
610 | # bb.build.exec_func('manifest_do_populate_pkgs', d) | ||
611 | # bb.build.exec_func('package_do_shlibs', d) | ||
612 | #} | ||
613 | |||
614 | base_do_package() { | 593 | base_do_package() { |
615 | : | 594 | : |
616 | } | 595 | } |
@@ -625,38 +604,6 @@ do_build[func] = "1" | |||
625 | SHLIBS = "" | 604 | SHLIBS = "" |
626 | RDEPENDS_prepend = " ${SHLIBS}" | 605 | RDEPENDS_prepend = " ${SHLIBS}" |
627 | 606 | ||
628 | python read_manifest () { | ||
629 | import sys | ||
630 | mfn = bb.data.getVar("MANIFEST", d, 1) | ||
631 | if os.access(mfn, os.R_OK): | ||
632 | # we have a manifest, so emit do_stage and do_populate_pkgs, | ||
633 | # and stuff some additional bits of data into the metadata store | ||
634 | mfile = file(mfn, "r") | ||
635 | manifest = bb.manifest.parse(mfile, d) | ||
636 | if not manifest: | ||
637 | return | ||
638 | |||
639 | bb.data.setVar('manifest', manifest, d) | ||
640 | } | ||
641 | |||
642 | python parse_manifest () { | ||
643 | manifest = bb.data.getVar("manifest", d) | ||
644 | if not manifest: | ||
645 | return | ||
646 | for func in ("do_populate_staging", "do_populate_pkgs"): | ||
647 | value = bb.manifest.emit(func, manifest, d) | ||
648 | if value: | ||
649 | bb.data.setVar("manifest_" + func, value, d) | ||
650 | bb.data.delVarFlag("manifest_" + func, "python", d) | ||
651 | bb.data.delVarFlag("manifest_" + func, "fakeroot", d) | ||
652 | bb.data.setVarFlag("manifest_" + func, "func", 1, d) | ||
653 | packages = [] | ||
654 | for l in manifest: | ||
655 | if "pkg" in l and l["pkg"] is not None: | ||
656 | packages.append(l["pkg"]) | ||
657 | bb.data.setVar("PACKAGES", " ".join(packages), d) | ||
658 | } | ||
659 | |||
660 | def explode_deps(s): | 607 | def explode_deps(s): |
661 | r = [] | 608 | r = [] |
662 | l = s.split() | 609 | l = s.split() |
@@ -740,15 +687,6 @@ python __anonymous () { | |||
740 | use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) | 687 | use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) |
741 | if use_nls != None: | 688 | if use_nls != None: |
742 | bb.data.setVar('USE_NLS', use_nls, d) | 689 | bb.data.setVar('USE_NLS', use_nls, d) |
743 | |||
744 | try: | ||
745 | bb.build.exec_func('read_manifest', d) | ||
746 | bb.build.exec_func('parse_manifest', d) | ||
747 | except exceptions.KeyboardInterrupt: | ||
748 | raise | ||
749 | except Exception, e: | ||
750 | bb.error("anonymous function: %s" % e) | ||
751 | pass | ||
752 | } | 690 | } |
753 | 691 | ||
754 | python () { | 692 | python () { |
@@ -772,26 +710,6 @@ python () { | |||
772 | return | 710 | return |
773 | } | 711 | } |
774 | 712 | ||
775 | |||
776 | addtask emit_manifest | ||
777 | python do_emit_manifest () { | ||
778 | # FIXME: emit a manifest here | ||
779 | # 1) adjust PATH to hit the wrapper scripts | ||
780 | wrappers = bb.which(bb.data.getVar("BBPATH", d, 1), 'build/install', 0) | ||
781 | path = (bb.data.getVar('PATH', d, 1) or '').split(':') | ||
782 | path.insert(0, os.path.dirname(wrappers)) | ||
783 | bb.data.setVar('PATH', ':'.join(path), d) | ||
784 | # 2) exec_func("do_install", d) | ||
785 | bb.build.exec_func('do_install', d) | ||
786 | # 3) read in data collected by the wrappers | ||
787 | bb.build.exec_func('read_manifest', d) | ||
788 | # 4) mangle the manifest we just generated, get paths back into | ||
789 | # our variable form | ||
790 | # 5) write it back out | ||
791 | # 6) re-parse it to ensure the generated functions are proper | ||
792 | bb.build.exec_func('parse_manifest', d) | ||
793 | } | ||
794 | |||
795 | 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 | 713 | 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 |
796 | 714 | ||
797 | MIRRORS[func] = "0" | 715 | MIRRORS[func] = "0" |
diff --git a/openembedded/classes/manifest.bbclass b/openembedded/classes/manifest.bbclass new file mode 100644 index 0000000000..687f4b756e --- /dev/null +++ b/openembedded/classes/manifest.bbclass | |||
@@ -0,0 +1,80 @@ | |||
1 | |||
2 | python read_manifest () { | ||
3 | import sys, bb.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 | ||
8 | mfile = file(mfn, "r") | ||
9 | manifest = bb.manifest.parse(mfile, d) | ||
10 | if not manifest: | ||
11 | return | ||
12 | |||
13 | bb.data.setVar('manifest', manifest, d) | ||
14 | } | ||
15 | |||
16 | python parse_manifest () { | ||
17 | manifest = bb.data.getVar("manifest", d) | ||
18 | if not manifest: | ||
19 | return | ||
20 | for func in ("do_populate_staging", "do_populate_pkgs"): | ||
21 | value = bb.manifest.emit(func, manifest, d) | ||
22 | if value: | ||
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) | ||
27 | packages = [] | ||
28 | for l in manifest: | ||
29 | if "pkg" in l and l["pkg"] is not None: | ||
30 | packages.append(l["pkg"]) | ||
31 | bb.data.setVar("PACKAGES", " ".join(packages), d) | ||
32 | } | ||
33 | |||
34 | python __anonymous () { | ||
35 | try: | ||
36 | bb.build.exec_func('read_manifest', d) | ||
37 | bb.build.exec_func('parse_manifest', d) | ||
38 | except exceptions.KeyboardInterrupt: | ||
39 | raise | ||
40 | except Exception, e: | ||
41 | bb.error("anonymous function: %s" % e) | ||
42 | pass | ||
43 | } | ||
44 | |||
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) | ||
50 | # else: | ||
51 | # bb.build.exec_func('manifest_do_populate_staging', d) | ||
52 | #} | ||
53 | |||
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) | ||
60 | #} | ||
61 | |||
62 | addtask emit_manifest | ||
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 | ||
76 | # our variable form | ||
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) | ||
80 | } | ||