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 | |
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')
-rw-r--r-- | meta/classes/debian.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/native.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 25 | ||||
-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 | ||||
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
9 files changed, 31 insertions, 14 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 2484003e37..45f01e43cd 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass | |||
@@ -8,7 +8,7 @@ | |||
8 | # | 8 | # |
9 | # Better expressed as ensure all RDEPENDS package before we package | 9 | # Better expressed as ensure all RDEPENDS package before we package |
10 | # This means we can't have circular RDEPENDS/RRECOMMENDS | 10 | # This means we can't have circular RDEPENDS/RRECOMMENDS |
11 | DEBIANRDEP = "do_package" | 11 | DEBIANRDEP = "do_packagedata" |
12 | do_package_write_ipk[rdeptask] = "${DEBIANRDEP}" | 12 | do_package_write_ipk[rdeptask] = "${DEBIANRDEP}" |
13 | do_package_write_deb[rdeptask] = "${DEBIANRDEP}" | 13 | do_package_write_deb[rdeptask] = "${DEBIANRDEP}" |
14 | do_package_write_tar[rdeptask] = "${DEBIANRDEP}" | 14 | do_package_write_tar[rdeptask] = "${DEBIANRDEP}" |
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0293d2e358..9b4dec8496 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -83,7 +83,7 @@ LDCONFIGDEPEND_libc-uclibc = "" | |||
83 | 83 | ||
84 | do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}" | 84 | do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}" |
85 | do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot" | 85 | do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot" |
86 | do_rootfs[recrdeptask] += "do_package" | 86 | do_rootfs[recrdeptask] += "do_packagedata" |
87 | 87 | ||
88 | IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}' | 88 | IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}' |
89 | inherit image-${IMAGE_TYPE_live} | 89 | inherit image-${IMAGE_TYPE_live} |
@@ -480,6 +480,7 @@ do_compile[noexec] = "1" | |||
480 | do_install[noexec] = "1" | 480 | do_install[noexec] = "1" |
481 | do_populate_sysroot[noexec] = "1" | 481 | do_populate_sysroot[noexec] = "1" |
482 | do_package[noexec] = "1" | 482 | do_package[noexec] = "1" |
483 | do_packagedata[noexec] = "1" | ||
483 | do_package_write_ipk[noexec] = "1" | 484 | do_package_write_ipk[noexec] = "1" |
484 | do_package_write_deb[noexec] = "1" | 485 | do_package_write_deb[noexec] = "1" |
485 | do_package_write_rpm[noexec] = "1" | 486 | do_package_write_rpm[noexec] = "1" |
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index c08ca19b78..bfc9e4c7db 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass | |||
@@ -151,6 +151,7 @@ python native_virtclass_handler () { | |||
151 | addhandler native_virtclass_handler | 151 | addhandler native_virtclass_handler |
152 | 152 | ||
153 | do_package[noexec] = "1" | 153 | do_package[noexec] = "1" |
154 | do_packagedata[noexec] = "1" | ||
154 | do_package_write_ipk[noexec] = "1" | 155 | do_package_write_ipk[noexec] = "1" |
155 | do_package_write_deb[noexec] = "1" | 156 | do_package_write_deb[noexec] = "1" |
156 | do_package_write_rpm[noexec] = "1" | 157 | do_package_write_rpm[noexec] = "1" |
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 |
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index eed9b8ac3b..ac8c9f3275 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass | |||
@@ -453,7 +453,7 @@ python do_package_write_deb () { | |||
453 | } | 453 | } |
454 | do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" | 454 | do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" |
455 | do_package_write_deb[umask] = "022" | 455 | do_package_write_deb[umask] = "022" |
456 | addtask package_write_deb before do_package_write after do_package | 456 | addtask package_write_deb before do_package_write after do_packagedata do_package |
457 | 457 | ||
458 | 458 | ||
459 | PACKAGEINDEXES += "package_update_index_deb;" | 459 | PACKAGEINDEXES += "package_update_index_deb;" |
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index b441e86c0a..ad4ea53ca9 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -477,7 +477,7 @@ python do_package_write_ipk () { | |||
477 | } | 477 | } |
478 | do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" | 478 | do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" |
479 | do_package_write_ipk[umask] = "022" | 479 | do_package_write_ipk[umask] = "022" |
480 | addtask package_write_ipk before do_package_write after do_package | 480 | addtask package_write_ipk before do_package_write after do_packagedata do_package |
481 | 481 | ||
482 | PACKAGEINDEXES += "package_update_index_ipk;" | 482 | PACKAGEINDEXES += "package_update_index_ipk;" |
483 | PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" | 483 | PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" |
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index dc8a54e1f8..af51d80627 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -1126,7 +1126,7 @@ python do_package_write_rpm () { | |||
1126 | 1126 | ||
1127 | do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" | 1127 | do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" |
1128 | do_package_write_rpm[umask] = "022" | 1128 | do_package_write_rpm[umask] = "022" |
1129 | addtask package_write_rpm before do_package_write after do_package | 1129 | addtask package_write_rpm before do_package_write after do_packagedata do_package |
1130 | 1130 | ||
1131 | PACKAGEINDEXES += "package_update_index_rpm; [ ! -e ${DEPLOY_DIR_RPM} ] || createrepo ${DEPLOY_DIR_RPM};" | 1131 | PACKAGEINDEXES += "package_update_index_rpm; [ ! -e ${DEPLOY_DIR_RPM} ] || createrepo ${DEPLOY_DIR_RPM};" |
1132 | PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" | 1132 | PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" |
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass index 332fa3f230..e76ce292e4 100644 --- a/meta/classes/package_tar.bbclass +++ b/meta/classes/package_tar.bbclass | |||
@@ -107,4 +107,4 @@ python do_package_write_tar () { | |||
107 | bb.build.exec_func("do_package_tar", d) | 107 | bb.build.exec_func("do_package_tar", d) |
108 | } | 108 | } |
109 | do_package_write_tar[dirs] = "${D}" | 109 | do_package_write_tar[dirs] = "${D}" |
110 | addtask package_write_tar before do_build after do_package | 110 | addtask package_write_tar before do_build after do_packagedata do_package |
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index e92fbae1f6..bc9f7ad739 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -655,13 +655,13 @@ def setscene_depvalid(task, taskdependees, notneeded, d): | |||
655 | if dep in notneeded: | 655 | if dep in notneeded: |
656 | continue | 656 | continue |
657 | # do_package_write_* and do_package doesn't need do_package | 657 | # do_package_write_* and do_package doesn't need do_package |
658 | if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']: | 658 | if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']: |
659 | continue | 659 | continue |
660 | # do_package_write_* and do_package doesn't need do_populate_sysroot | 660 | # do_package_write_* and do_package doesn't need do_populate_sysroot |
661 | if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']: | 661 | if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']: |
662 | continue | 662 | continue |
663 | # Native/Cross packages don't exist and are noexec anyway | 663 | # Native/Cross packages don't exist and are noexec anyway |
664 | if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']: | 664 | if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']: |
665 | continue | 665 | continue |
666 | 666 | ||
667 | # Consider sysroot depending on sysroot tasks | 667 | # Consider sysroot depending on sysroot tasks |