diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-23 14:27:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-25 12:42:47 +0000 |
commit | 32472926832ed1344889c992c1919a2a8b778b2c (patch) | |
tree | 56e2f50861fcfaf09c4ce63a3047630377984e9e /meta/classes/package.bbclass | |
parent | c13e458b22ca1b870332540e0edbc1975c342c79 (diff) | |
download | poky-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.bbclass | 25 |
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" | |||
1900 | SSTATETASKS += "do_package" | 1900 | SSTATETASKS += "do_package" |
1901 | do_package[sstate-name] = "package" | 1901 | do_package[sstate-name] = "package" |
1902 | do_package[cleandirs] = "${PKGDESTWORK}" | 1902 | do_package[cleandirs] = "${PKGDESTWORK}" |
1903 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" | 1903 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}" |
1904 | do_package[sstate-inputdirs] = "${PKGDESTWORK}" | ||
1905 | do_package[sstate-outputdirs] = "${PKGDATA_DIR}" | ||
1906 | do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" | 1904 | do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" |
1907 | do_package_setscene[dirs] = "${STAGING_DIR}" | 1905 | do_package_setscene[dirs] = "${STAGING_DIR}" |
1908 | 1906 | ||
@@ -1911,6 +1909,23 @@ python do_package_setscene () { | |||
1911 | } | 1909 | } |
1912 | addtask do_package_setscene | 1910 | addtask do_package_setscene |
1913 | 1911 | ||
1912 | do_packagedata () { | ||
1913 | : | ||
1914 | } | ||
1915 | |||
1916 | addtask packagedata before do_build after do_package | ||
1917 | |||
1918 | SSTATETASKS += "do_packagedata" | ||
1919 | do_packagedata[sstate-name] = "packagedata" | ||
1920 | do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}" | ||
1921 | do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}" | ||
1922 | do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}" | ||
1923 | |||
1924 | python do_packagedata_setscene () { | ||
1925 | sstate_setscene(d) | ||
1926 | } | ||
1927 | addtask do_packagedata_setscene | ||
1928 | |||
1914 | # Dummy task to mark when all packaging is complete | 1929 | # Dummy task to mark when all packaging is complete |
1915 | do_package_write () { | 1930 | do_package_write () { |
1916 | : | 1931 | : |
@@ -1918,7 +1933,7 @@ do_package_write () { | |||
1918 | do_package_write[noexec] = "1" | 1933 | do_package_write[noexec] = "1" |
1919 | PACKAGERDEPTASK = "do_package_write" | 1934 | PACKAGERDEPTASK = "do_package_write" |
1920 | do_build[recrdeptask] += "${PACKAGERDEPTASK}" | 1935 | do_build[recrdeptask] += "${PACKAGERDEPTASK}" |
1921 | addtask package_write before do_build after do_package | 1936 | addtask 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 |