diff options
-rw-r--r-- | meta/classes/base.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/debian.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 37 | ||||
-rw-r--r-- | meta/classes/package_deb.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/package_ipk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/package_rpm.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/package_tar.bbclass | 2 |
7 files changed, 35 insertions, 14 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 54c30f7b8f..3a393a04db 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -565,7 +565,7 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T | |||
565 | ${STAGING_DATADIR} \ | 565 | ${STAGING_DATADIR} \ |
566 | ${S} ${B}" | 566 | ${S} ${B}" |
567 | 567 | ||
568 | addtask populate_staging after do_package | 568 | addtask populate_staging after do_package_write |
569 | 569 | ||
570 | python do_populate_staging () { | 570 | python do_populate_staging () { |
571 | bb.build.exec_func('do_stage', d) | 571 | bb.build.exec_func('do_stage', d) |
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 698d917b51..7ffa6c1a27 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass | |||
@@ -8,7 +8,7 @@ BUILD_ALL_DEPS = "1" | |||
8 | 8 | ||
9 | # Better expressed as ensure all RDEPENDS package before we package | 9 | # Better expressed as ensure all RDEPENDS package before we package |
10 | # This means we can't have circular RDEPENDS/RRECOMMENDS | 10 | # This means we can't have circular RDEPENDS/RRECOMMENDS |
11 | do_package[rdeptask] = "do_package" | 11 | do_package_write[rdeptask] = "do_package" |
12 | 12 | ||
13 | python debian_package_name_hook () { | 13 | python debian_package_name_hook () { |
14 | import glob, copy, stat, errno, re | 14 | import glob, copy, stat, errno, re |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 271c8f585c..a429e43c44 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -451,8 +451,6 @@ python populate_packages () { | |||
451 | if found == False: | 451 | if found == False: |
452 | bb.note("%s contains dangling symlink to %s" % (pkg, l)) | 452 | bb.note("%s contains dangling symlink to %s" % (pkg, l)) |
453 | bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) | 453 | bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) |
454 | |||
455 | bb.build.exec_func('emit_pkgdata', d) | ||
456 | } | 454 | } |
457 | populate_packages[dirs] = "${D}" | 455 | populate_packages[dirs] = "${D}" |
458 | 456 | ||
@@ -482,6 +480,11 @@ python emit_pkgdata() { | |||
482 | write_if_exists(sf, pkg, 'DESCRIPTION') | 480 | write_if_exists(sf, pkg, 'DESCRIPTION') |
483 | write_if_exists(sf, pkg, 'RDEPENDS') | 481 | write_if_exists(sf, pkg, 'RDEPENDS') |
484 | write_if_exists(sf, pkg, 'RPROVIDES') | 482 | write_if_exists(sf, pkg, 'RPROVIDES') |
483 | write_if_exists(sf, pkg, 'RRECOMMENDS') | ||
484 | write_if_exists(sf, pkg, 'RSUGGESTS') | ||
485 | write_if_exists(sf, pkg, 'RPROVIDES') | ||
486 | write_if_exists(sf, pkg, 'RREPLACES') | ||
487 | write_if_exists(sf, pkg, 'RCONFLICTS') | ||
485 | write_if_exists(sf, pkg, 'PKG') | 488 | write_if_exists(sf, pkg, 'PKG') |
486 | write_if_exists(sf, pkg, 'ALLOW_EMPTY') | 489 | write_if_exists(sf, pkg, 'ALLOW_EMPTY') |
487 | write_if_exists(sf, pkg, 'FILES') | 490 | write_if_exists(sf, pkg, 'FILES') |
@@ -490,7 +493,6 @@ python emit_pkgdata() { | |||
490 | write_if_exists(sf, pkg, 'pkg_preinst') | 493 | write_if_exists(sf, pkg, 'pkg_preinst') |
491 | write_if_exists(sf, pkg, 'pkg_prerm') | 494 | write_if_exists(sf, pkg, 'pkg_prerm') |
492 | sf.close() | 495 | sf.close() |
493 | bb.build.exec_func("read_subpackage_metadata", d) | ||
494 | } | 496 | } |
495 | emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime" | 497 | emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime" |
496 | 498 | ||
@@ -822,29 +824,48 @@ python package_depchains() { | |||
822 | } | 824 | } |
823 | 825 | ||
824 | 826 | ||
825 | PACKAGEFUNCS = "package_do_split_locales \ | 827 | |
828 | PACKAGEFUNCS ?= "package_do_split_locales \ | ||
826 | populate_packages \ | 829 | populate_packages \ |
827 | package_do_shlibs \ | 830 | package_do_shlibs \ |
828 | package_do_pkgconfig \ | 831 | package_do_pkgconfig \ |
829 | read_shlibdeps \ | 832 | read_shlibdeps \ |
830 | package_depchains" | 833 | package_depchains \ |
834 | emit_pkgdata" | ||
831 | 835 | ||
832 | python package_do_package () { | 836 | python package_do_package () { |
833 | for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split(): | 837 | for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split(): |
834 | bb.build.exec_func(f, d) | 838 | bb.build.exec_func(f, d) |
835 | } | 839 | } |
836 | |||
837 | do_package[dirs] = "${D}" | ||
838 | # shlibs requires any DEPENDS to have already packaged for the *.list files | 840 | # shlibs requires any DEPENDS to have already packaged for the *.list files |
839 | do_package[deptask] = "do_package" | 841 | do_package[deptask] = "do_package" |
840 | EXPORT_FUNCTIONS do_package | 842 | do_package[dirs] = "${D}" |
841 | addtask package before do_build after do_install | 843 | addtask package before do_build after do_install |
842 | 844 | ||
845 | |||
846 | |||
847 | PACKAGE_WRITE_FUNCS ?= "read_subpackage_metadata" | ||
848 | |||
849 | python package_do_package_write () { | ||
850 | for f in (bb.data.getVar('PACKAGE_WRITE_FUNCS', d, 1) or '').split(): | ||
851 | bb.build.exec_func(f, d) | ||
852 | } | ||
853 | do_package_write[dirs] = "${D}" | ||
854 | addtask package_write before do_build after do_package | ||
855 | |||
856 | |||
857 | EXPORT_FUNCTIONS do_package do_package_write | ||
858 | |||
859 | |||
843 | # | 860 | # |
844 | # Helper functions for the package writing classes | 861 | # Helper functions for the package writing classes |
845 | # | 862 | # |
846 | 863 | ||
847 | python package_mapping_rename_hook () { | 864 | python package_mapping_rename_hook () { |
865 | """ | ||
866 | Rewrite variables to account for package renaming in things | ||
867 | like debian.bbclass or manual PKG variable name changes | ||
868 | """ | ||
848 | runtime_mapping_rename("RDEPENDS", d) | 869 | runtime_mapping_rename("RDEPENDS", d) |
849 | runtime_mapping_rename("RRECOMMENDS", d) | 870 | runtime_mapping_rename("RRECOMMENDS", d) |
850 | runtime_mapping_rename("RSUGGESTS", d) | 871 | runtime_mapping_rename("RSUGGESTS", d) |
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index de93593c95..c19a9249d5 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass | |||
@@ -2,7 +2,7 @@ inherit package | |||
2 | DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" | 2 | DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" |
3 | BOOTSTRAP_EXTRA_RDEPENDS += "dpkg" | 3 | BOOTSTRAP_EXTRA_RDEPENDS += "dpkg" |
4 | DISTRO_EXTRA_RDEPENDS += "dpkg" | 4 | DISTRO_EXTRA_RDEPENDS += "dpkg" |
5 | PACKAGEFUNCS += "do_package_deb" | 5 | PACKAGE_WRITE_FUNCS += "do_package_deb" |
6 | IMAGE_PKGTYPE ?= "deb" | 6 | IMAGE_PKGTYPE ?= "deb" |
7 | 7 | ||
8 | python package_deb_fn () { | 8 | python package_deb_fn () { |
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index f297381f87..54fecf6659 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -2,7 +2,7 @@ inherit package | |||
2 | DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" | 2 | DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" |
3 | BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" | 3 | BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" |
4 | DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" | 4 | DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" |
5 | PACKAGEFUNCS += "do_package_ipk" | 5 | PACKAGE_WRITE_FUNCS += "do_package_ipk" |
6 | IMAGE_PKGTYPE ?= "ipk" | 6 | IMAGE_PKGTYPE ?= "ipk" |
7 | 7 | ||
8 | python package_ipk_fn () { | 8 | python package_ipk_fn () { |
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index ee579bed55..4955792916 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -2,7 +2,7 @@ inherit package | |||
2 | inherit rpm_core | 2 | inherit rpm_core |
3 | 3 | ||
4 | RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" | 4 | RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" |
5 | PACKAGEFUNCS += "do_package_rpm" | 5 | PACKAGE_WRITE_FUNCS += "do_package_rpm" |
6 | IMAGE_PKGTYPE ?= "rpm" | 6 | IMAGE_PKGTYPE ?= "rpm" |
7 | 7 | ||
8 | python write_specfile() { | 8 | python write_specfile() { |
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass index d8c7919c3a..81ae0f84a0 100644 --- a/meta/classes/package_tar.bbclass +++ b/meta/classes/package_tar.bbclass | |||
@@ -1,6 +1,6 @@ | |||
1 | inherit package | 1 | inherit package |
2 | 2 | ||
3 | PACKAGEFUNCS += "do_package_tar" | 3 | PACKAGE_WRITE_FUNCS += "do_package_tar" |
4 | IMAGE_PKGTYPE ?= "tar" | 4 | IMAGE_PKGTYPE ?= "tar" |
5 | 5 | ||
6 | python package_tar_fn () { | 6 | python package_tar_fn () { |