summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-10-20 16:09:05 +0000
committerRichard Purdie <richard@openedhand.com>2006-10-20 16:09:05 +0000
commite2b821a8345b65318da04ecde14d15924a229c8a (patch)
tree20860f6b00d9f0a9a0fa861cc8593499f326ad2c /meta/classes/package.bbclass
parent49d42d9fe619a6897cd95ba42defcb1e5a4bff1f (diff)
downloadpoky-e2b821a8345b65318da04ecde14d15924a229c8a.tar.gz
package.bbclass: Split into two tasks, one which prepares the packages and then package_write which actually generates the packages. The two stage approach allows us to avoid circular dependency issues from classes like debian.bbclass. As the data being emitted into pkgdata/ changed, you need to either wipe tmp or rerun the do_install/do_package tasks (wipe the do_xyz stamps from the stamps dir). Everything will repackage anyway due to the new task.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@807 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass37
1 files changed, 29 insertions, 8 deletions
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}
457populate_packages[dirs] = "${D}" 455populate_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}
495emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime" 497emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime"
496 498
@@ -822,29 +824,48 @@ python package_depchains() {
822} 824}
823 825
824 826
825PACKAGEFUNCS = "package_do_split_locales \ 827
828PACKAGEFUNCS ?= "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
832python package_do_package () { 836python 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
837do_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
839do_package[deptask] = "do_package" 841do_package[deptask] = "do_package"
840EXPORT_FUNCTIONS do_package 842do_package[dirs] = "${D}"
841addtask package before do_build after do_install 843addtask package before do_build after do_install
842 844
845
846
847PACKAGE_WRITE_FUNCS ?= "read_subpackage_metadata"
848
849python 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}
853do_package_write[dirs] = "${D}"
854addtask package_write before do_build after do_package
855
856
857EXPORT_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
847python package_mapping_rename_hook () { 864python 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)