Patchwork package: Drop do_package_write task

login
register
mail settings
Submitter Richard Purdie
Date Feb. 24, 2014, 4:12 p.m.
Message ID <1393258327.31769.12.camel@ted>
Download mbox | patch
Permalink /patch/67277/
State New
Headers show

Comments

Richard Purdie - Feb. 24, 2014, 4:12 p.m.
The reasons this task was introduced are lost in the mists of time. It
allowed for the a single "package_write" task instead of spelling out
the explicit package backends, however in all but one case we do that
anyway.

As such as might as well give in and delete the task, converting that
single reference into explicit dependencies.

This gives bitbake a bit less work to to when processing the runqueue
since there are less tasks (but more dependencies in some cases).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 297d962..0018a62 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -235,9 +235,6 @@  python () {
 
         # shlibs requires any DEPENDS to have already packaged for the *.list files
         d.appendVarFlag('do_package', 'deptask', " do_packagedata")
-
-    elif not bb.data.inherits_class('image', d):
-        d.setVar("PACKAGERDEPTASK", "")
 }
 
 def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
@@ -2003,15 +2000,6 @@  python do_packagedata_setscene () {
 }
 addtask do_packagedata_setscene
 
-# Dummy task to mark when all packaging is complete
-do_package_write () {
-	:
-}
-do_package_write[noexec] = "1"
-PACKAGERDEPTASK = "do_package_write"
-do_build[recrdeptask] += "${PACKAGERDEPTASK}"
-addtask package_write before do_build after do_packagedata
-
 #
 # Helper functions for the package writing classes
 #
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index b9d7978..a16d57e 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -311,3 +311,5 @@  addtask package_write_deb before do_package_write after do_packagedata do_packag
 
 PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
 PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"
+
+do_build[recrdeptask] += "do_package_write_deb"
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 7cf2c8a..aab31e5 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -257,3 +257,5 @@  addtask package_write_ipk before do_package_write after do_packagedata do_packag
 
 PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
 PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
+
+do_build[recrdeptask] += "do_package_write_ipk"
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index f267b8a..bce5648 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -736,3 +736,5 @@  addtask package_write_rpm before do_package_write after do_packagedata do_packag
 
 PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
 PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
+
+do_build[recrdeptask] += "do_package_write_rpm"