]> code.ossystems Code Review - openembedded-core.git/commitdiff
archive-*-source.bbclass: handle dependency in anonymous function
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 7 May 2013 12:31:14 +0000 (15:31 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 May 2013 12:57:26 +0000 (13:57 +0100)
Using "before do_rootfs" would have this task added to do_rootfs
dependencies regardless of the filtering options. Instead, add this
dependency in the anonymous python function.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/archive-configured-source.bbclass
meta/classes/archive-original-source.bbclass
meta/classes/archive-patched-source.bbclass

index a481b141db151cbb49fcb5961a9dd4ef524c3cde..54c234406ae4ffb162e629e157d64f9fe6cd6c0a 100644 (file)
@@ -14,7 +14,7 @@ addtask do_archive_configured_sources after do_configure
 addtask do_archive_scripts_logs
 
 # Get dump date and create diff file 
-addtask do_dumpdata_create_diff_gz before do_rootfs
+addtask do_dumpdata_create_diff_gz
 
 python () {
     pn = d.getVar('PN', True)
@@ -34,7 +34,10 @@ python () {
         d.appendVarFlag('do_compile', 'depends', ' %s:do_archive_configured_sources' %pn)
         build_deps += ' %s:do_archive_configured_sources' %pn
 
-    d.appendVarFlag('do_build', 'depends', build_deps)
+    if bb.data.inherits_class('image', d):
+        d.appendVarFlag('do_rootfs', 'depends', build_deps)
+    else:
+        d.appendVarFlag('do_build', 'depends', build_deps)
 }
 
 ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/"
index 2796ff96003802e07ff3248e44dfbc6842b3eb28..7e9ed6d11100db352a39b61ab71cbfa52ba36221 100644 (file)
@@ -14,7 +14,7 @@ addtask do_archive_original_sources_patches after do_unpack
 addtask do_archive_scripts_logs
 
 # Get dump date and create diff file 
-addtask do_dumpdata_create_diff_gz before do_rootfs
+addtask do_dumpdata_create_diff_gz
 
 python () {
     pn = d.getVar('PN', True)
@@ -34,7 +34,10 @@ python () {
         d.appendVarFlag('do_patch', 'depends', ' %s:do_archive_original_sources_patches' %pn)
         build_deps += ' %s:do_archive_original_sources_patches' %pn
 
-    d.appendVarFlag('do_build', 'depends', build_deps)
+    if bb.data.inherits_class('image', d):
+        d.appendVarFlag('do_rootfs', 'depends', build_deps)
+    else:
+        d.appendVarFlag('do_build', 'depends', build_deps)
 }
 
 ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/"
index 995a25947351fafd12ada4ce070b698773308fa5..d8d494a45d28135c26331d7cc8d4fc8f5ff958f3 100644 (file)
@@ -14,7 +14,7 @@ addtask do_archive_patched_sources after do_patch
 addtask do_archive_scripts_logs
 
 # Get dump date and create diff file 
-addtask do_dumpdata_create_diff_gz before do_rootfs
+addtask do_dumpdata_create_diff_gz
 
 python () {
     pn = d.getVar('PN', True)
@@ -34,7 +34,10 @@ python () {
         d.appendVarFlag('do_configure', 'depends', ' %s:do_archive_patched_sources' %pn)
         build_deps += ' %s:do_archive_patched_sources' %pn
 
-    d.appendVarFlag('do_build', 'depends', build_deps)
+    if bb.data.inherits_class('image', d):
+        d.appendVarFlag('do_rootfs', 'depends', build_deps)
+    else:
+        d.appendVarFlag('do_build', 'depends', build_deps)
 }
 
 ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/"