summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-23 14:27:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-25 12:42:47 +0000
commit32472926832ed1344889c992c1919a2a8b778b2c (patch)
tree56e2f50861fcfaf09c4ce63a3047630377984e9e /meta/classes/package.bbclass
parentc13e458b22ca1b870332540e0edbc1975c342c79 (diff)
downloadpoky-32472926832ed1344889c992c1919a2a8b778b2c.tar.gz
Split do_packagedata task from do_package
Currently, do_rootfs has a dependency on all the do_package output being present due to its usage of the pkgdata directories. This means that if you run: bitbake xxxx-image -c rootfs you end up having to fetch and unpack all the do_package data which is usually large and inefficient. It also means rm_work has to leave all the do_package data lying around so rootfs works. This patch splits the actual creation of the pkgdata directory off into a separate task, "packagedata" which happens immediately after do_package. We can then remap the dependencies so this task is depended upon, not do_package. Sstate can then be programmed not to require do_package at the appropriate times. Whilst this patch doesn't do so, it opens the possibility of rm_work wiping out the do_package output from WORKDIR as long as it also removed the do_package stamp (both normal and setscene variants) and allowing more space savings with rm_work which has been regularly requested. (From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass25
1 files changed, 20 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 60d3df7789..e8d7aefd86 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -217,7 +217,7 @@ python () {
217 d.appendVarFlag('do_package', 'depends', deps) 217 d.appendVarFlag('do_package', 'depends', deps)
218 218
219 # shlibs requires any DEPENDS to have already packaged for the *.list files 219 # shlibs requires any DEPENDS to have already packaged for the *.list files
220 d.appendVarFlag('do_package', 'deptask', " do_package") 220 d.appendVarFlag('do_package', 'deptask', " do_packagedata")
221 221
222 elif not bb.data.inherits_class('image', d): 222 elif not bb.data.inherits_class('image', d):
223 d.setVar("PACKAGERDEPTASK", "") 223 d.setVar("PACKAGERDEPTASK", "")
@@ -1900,9 +1900,7 @@ PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
1900SSTATETASKS += "do_package" 1900SSTATETASKS += "do_package"
1901do_package[sstate-name] = "package" 1901do_package[sstate-name] = "package"
1902do_package[cleandirs] = "${PKGDESTWORK}" 1902do_package[cleandirs] = "${PKGDESTWORK}"
1903do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" 1903do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
1904do_package[sstate-inputdirs] = "${PKGDESTWORK}"
1905do_package[sstate-outputdirs] = "${PKGDATA_DIR}"
1906do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" 1904do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
1907do_package_setscene[dirs] = "${STAGING_DIR}" 1905do_package_setscene[dirs] = "${STAGING_DIR}"
1908 1906
@@ -1911,6 +1909,23 @@ python do_package_setscene () {
1911} 1909}
1912addtask do_package_setscene 1910addtask do_package_setscene
1913 1911
1912do_packagedata () {
1913 :
1914}
1915
1916addtask packagedata before do_build after do_package
1917
1918SSTATETASKS += "do_packagedata"
1919do_packagedata[sstate-name] = "packagedata"
1920do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
1921do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
1922do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
1923
1924python do_packagedata_setscene () {
1925 sstate_setscene(d)
1926}
1927addtask do_packagedata_setscene
1928
1914# Dummy task to mark when all packaging is complete 1929# Dummy task to mark when all packaging is complete
1915do_package_write () { 1930do_package_write () {
1916 : 1931 :
@@ -1918,7 +1933,7 @@ do_package_write () {
1918do_package_write[noexec] = "1" 1933do_package_write[noexec] = "1"
1919PACKAGERDEPTASK = "do_package_write" 1934PACKAGERDEPTASK = "do_package_write"
1920do_build[recrdeptask] += "${PACKAGERDEPTASK}" 1935do_build[recrdeptask] += "${PACKAGERDEPTASK}"
1921addtask package_write before do_build after do_package 1936addtask package_write before do_build after do_packagedata
1922 1937
1923# 1938#
1924# Helper functions for the package writing classes 1939# Helper functions for the package writing classes