diff options
Diffstat (limited to 'meta/classes')
-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 54c30f7b8..3a393a04d 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 ${STAGING_DATADIR} \ ${S} ${B}" -addtask populate_staging after do_package +addtask populate_staging after do_package_write python do_populate_staging () { bb.build.exec_func('do_stage', d) diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 698d917b5..7ffa6c1a2 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass @@ -8,7 +8,7 @@ BUILD_ALL_DEPS = "1" # Better expressed as ensure all RDEPENDS package before we package # This means we can't have circular RDEPENDS/RRECOMMENDS -do_package[rdeptask] = "do_package" +do_package_write[rdeptask] = "do_package" python debian_package_name_hook () { import glob, copy, stat, errno, re diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 271c8f585..a429e43c4 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -451,8 +451,6 @@ python populate_packages () { if found == False: bb.note("%s contains dangling symlink to %s" % (pkg, l)) bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) - - bb.build.exec_func('emit_pkgdata', d) } populate_packages[dirs] = "${D}" @@ -482,6 +480,11 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'DESCRIPTION') write_if_exists(sf, pkg, 'RDEPENDS') write_if_exists(sf, pkg, 'RPROVIDES') + write_if_exists(sf, pkg, 'RRECOMMENDS') + write_if_exists(sf, pkg, 'RSUGGESTS') + write_if_exists(sf, pkg, 'RPROVIDES') + write_if_exists(sf, pkg, 'RREPLACES') + write_if_exists(sf, pkg, 'RCONFLICTS') write_if_exists(sf, pkg, 'PKG') write_if_exists(sf, pkg, 'ALLOW_EMPTY') write_if_exists(sf, pkg, 'FILES') @@ -490,7 +493,6 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'pkg_preinst') write_if_exists(sf, pkg, 'pkg_prerm') sf.close() - bb.build.exec_func("read_subpackage_metadata", d) } emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime" @@ -822,29 +824,48 @@ python package_depchains() { } -PACKAGEFUNCS = "package_do_split_locales \ + +PACKAGEFUNCS ?= "package_do_split_locales \ populate_packages \ package_do_shlibs \ package_do_pkgconfig \ read_shlibdeps \ - package_depchains" + package_depchains \ + emit_pkgdata" python package_do_package () { for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split(): bb.build.exec_func(f, d) } - -do_package[dirs] = "${D}" # shlibs requires any DEPENDS to have already packaged for the *.list files do_package[deptask] = "do_package" -EXPORT_FUNCTIONS do_package +do_package[dirs] = "${D}" addtask package before do_build after do_install + + +PACKAGE_WRITE_FUNCS ?= "read_subpackage_metadata" + +python package_do_package_write () { + for f in (bb.data.getVar('PACKAGE_WRITE_FUNCS', d, 1) or '').split(): + bb.build.exec_func(f, d) +} +do_package_write[dirs] = "${D}" +addtask package_write before do_build after do_package + + +EXPORT_FUNCTIONS do_package do_package_write + + # # Helper functions for the package writing classes # python package_mapping_rename_hook () { + """ + Rewrite variables to account for package renaming in things + like debian.bbclass or manual PKG variable name changes + """ runtime_mapping_rename("RDEPENDS", d) runtime_mapping_rename("RRECOMMENDS", d) runtime_mapping_rename("RSUGGESTS", d) diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index de93593c9..c19a9249d 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -2,7 +2,7 @@ inherit package DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" BOOTSTRAP_EXTRA_RDEPENDS += "dpkg" DISTRO_EXTRA_RDEPENDS += "dpkg" -PACKAGEFUNCS += "do_package_deb" +PACKAGE_WRITE_FUNCS += "do_package_deb" IMAGE_PKGTYPE ?= "deb" python package_deb_fn () { diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index f297381f8..54fecf665 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -2,7 +2,7 @@ inherit package DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" -PACKAGEFUNCS += "do_package_ipk" +PACKAGE_WRITE_FUNCS += "do_package_ipk" IMAGE_PKGTYPE ?= "ipk" python package_ipk_fn () { diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index ee579bed5..495579291 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -2,7 +2,7 @@ inherit package inherit rpm_core RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" -PACKAGEFUNCS += "do_package_rpm" +PACKAGE_WRITE_FUNCS += "do_package_rpm" IMAGE_PKGTYPE ?= "rpm" python write_specfile() { diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass index d8c7919c3..81ae0f84a 100644 --- a/meta/classes/package_tar.bbclass +++ b/meta/classes/package_tar.bbclass @@ -1,6 +1,6 @@ inherit package -PACKAGEFUNCS += "do_package_tar" +PACKAGE_WRITE_FUNCS += "do_package_tar" IMAGE_PKGTYPE ?= "tar" python package_tar_fn () { |