Patchwork [2/2,v3] archive-*-source.bbclass: Handle all package classes

login
register
mail settings
Submitter Shakeel, Muhammad
Date Jan. 22, 2013, 12:11 p.m.
Message ID <1358856682-17083-1-git-send-email-muhammad_shakeel@mentor.com>
Download mbox | patch
Permalink /patch/43175/
State New
Headers show

Comments

Shakeel, Muhammad - Jan. 22, 2013, 12:11 p.m.
From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

* Add archiver tasks correctly for any 'IMAGE_PKGTYPE'.

[YOCTO #3449]

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/archive-configured-source.bbclass |    8 ++++++--
 meta/classes/archive-original-source.bbclass   |    8 ++++++--
 meta/classes/archive-patched-source.bbclass    |    8 ++++++--
 3 files changed, 18 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
index ae70be3..8323fda 100644
--- a/meta/classes/archive-configured-source.bbclass
+++ b/meta/classes/archive-configured-source.bbclass
@@ -11,12 +11,15 @@  inherit archiver
 addtask do_archive_configured_sources after do_configure
 
 # Get archiving package with temp(logs) and scripts(.bb and inc files)
-addtask do_archive_scripts_logs after do_package_write_rpm
+addtask do_archive_scripts_logs
 
 # Get dump date and create diff file 
-addtask do_dumpdata_create_diff_gz after do_package_write_rpm before do_build
+addtask do_dumpdata_create_diff_gz before do_build
 
 python () {
+    packaging = d.getVar('IMAGE_PKGTYPE', True)
+    d.appendVarFlag('do_dumpdata_create_diff_gz', 'recrdeptask', ' do_package_write_' + packaging)
+
     if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
         """
         If package type is not 'srpm' then add tasks to move archive packages of
@@ -24,6 +27,7 @@  python () {
         """
         d.appendVarFlag('do_compile', 'deps', ['do_archive_configured_sources'])
         d.appendVarFlag('do_build', 'recrdeptask', ' do_archive_configured_sources')
+        d.appendVarFlag('do_archive_scripts_logs', 'recrdeptask', ' do_package_write_' + packaging)
         d.appendVarFlag('do_build', 'deps', ['do_archive_scripts_logs'])
 
     else:
diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass
index f668f3e..f61f82b 100644
--- a/meta/classes/archive-original-source.bbclass
+++ b/meta/classes/archive-original-source.bbclass
@@ -11,12 +11,15 @@  inherit archiver
 addtask do_archive_original_sources_patches after do_unpack
 
 # Get archiving package with temp(logs) and scripts(.bb and inc files)
-addtask do_archive_scripts_logs after do_package_write_rpm
+addtask do_archive_scripts_logs
 
 # Get dump date and create diff file 
-addtask do_dumpdata_create_diff_gz after do_package_write_rpm before do_build
+addtask do_dumpdata_create_diff_gz before do_build
 
 python () {
+    packaging = d.getVar('IMAGE_PKGTYPE', True)
+    d.appendVarFlag('do_dumpdata_create_diff_gz', 'recrdeptask', ' do_package_write_' + packaging)
+
     if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
         """
         If package type is not 'srpm' then add tasks to move archive packages of
@@ -24,6 +27,7 @@  python () {
         """
         d.appendVarFlag('do_patch', 'deps', ['do_archive_original_sources_patches'])
         d.appendVarFlag('do_build', 'recrdeptask', ' do_archive_original_sources_patches')
+        d.appendVarFlag('do_archive_scripts_logs', 'recrdeptask', ' do_package_write_' + packaging)
         d.appendVarFlag('do_build', 'deps', ['do_archive_scripts_logs'])
 
     else:
diff --git a/meta/classes/archive-patched-source.bbclass b/meta/classes/archive-patched-source.bbclass
index daadaae..7644a6e 100644
--- a/meta/classes/archive-patched-source.bbclass
+++ b/meta/classes/archive-patched-source.bbclass
@@ -11,12 +11,15 @@  inherit archiver
 addtask do_archive_patched_sources after do_patch
 
 # Get archiving package with logs(temp) and scripts(.bb and .inc files)
-addtask do_archive_scripts_logs after do_package_write_rpm
+addtask do_archive_scripts_logs
 
 # Get dump date and create diff file 
-addtask do_dumpdata_create_diff_gz after do_package_write_rpm before do_build
+addtask do_dumpdata_create_diff_gz before do_build
 
 python () {
+    packaging = d.getVar('IMAGE_PKGTYPE', True)
+    d.appendVarFlag('do_dumpdata_create_diff_gz', 'recrdeptask', ' do_package_write_' + packaging)
+
     if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
         """
         If package type is not 'srpm' then add tasks to move archive packages of
@@ -24,6 +27,7 @@  python () {
         """
         d.appendVarFlag('do_configure', 'deps', ['do_archive_patched_sources'])
         d.appendVarFlag('do_build', 'recrdeptask', ' do_archive_patched_sources')
+        d.appendVarFlag('do_archive_scripts_logs', 'recrdeptask', ' do_package_write_' + packaging)
         d.appendVarFlag('do_build', 'deps', ['do_archive_scripts_logs'])
 
     else: