mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
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>
This commit is contained in:
@@ -217,7 +217,7 @@ python () {
|
||||
d.appendVarFlag('do_package', 'depends', deps)
|
||||
|
||||
# shlibs requires any DEPENDS to have already packaged for the *.list files
|
||||
d.appendVarFlag('do_package', 'deptask', " do_package")
|
||||
d.appendVarFlag('do_package', 'deptask', " do_packagedata")
|
||||
|
||||
elif not bb.data.inherits_class('image', d):
|
||||
d.setVar("PACKAGERDEPTASK", "")
|
||||
@@ -1900,9 +1900,7 @@ PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
|
||||
SSTATETASKS += "do_package"
|
||||
do_package[sstate-name] = "package"
|
||||
do_package[cleandirs] = "${PKGDESTWORK}"
|
||||
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
|
||||
do_package[sstate-inputdirs] = "${PKGDESTWORK}"
|
||||
do_package[sstate-outputdirs] = "${PKGDATA_DIR}"
|
||||
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
|
||||
do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
|
||||
do_package_setscene[dirs] = "${STAGING_DIR}"
|
||||
|
||||
@@ -1911,6 +1909,23 @@ python do_package_setscene () {
|
||||
}
|
||||
addtask do_package_setscene
|
||||
|
||||
do_packagedata () {
|
||||
:
|
||||
}
|
||||
|
||||
addtask packagedata before do_build after do_package
|
||||
|
||||
SSTATETASKS += "do_packagedata"
|
||||
do_packagedata[sstate-name] = "packagedata"
|
||||
do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
|
||||
do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
|
||||
do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
|
||||
|
||||
python do_packagedata_setscene () {
|
||||
sstate_setscene(d)
|
||||
}
|
||||
addtask do_packagedata_setscene
|
||||
|
||||
# Dummy task to mark when all packaging is complete
|
||||
do_package_write () {
|
||||
:
|
||||
@@ -1918,7 +1933,7 @@ do_package_write () {
|
||||
do_package_write[noexec] = "1"
|
||||
PACKAGERDEPTASK = "do_package_write"
|
||||
do_build[recrdeptask] += "${PACKAGERDEPTASK}"
|
||||
addtask package_write before do_build after do_package
|
||||
addtask package_write before do_build after do_packagedata
|
||||
|
||||
#
|
||||
# Helper functions for the package writing classes
|
||||
|
||||
Reference in New Issue
Block a user