archive-*-source.bbclass: Handle all package classes
authorMuhammad Shakeel <muhammad_shakeel@mentor.com>
Wed, 20 Feb 2013 13:50:57 +0000 (18:50 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Feb 2013 23:15:45 +0000 (23:15 +0000)
* Add archiver tasks correctly for any 'IMAGE_PKGTYPE'.

[YOCTO #3449]

(From OE-Core rev: 0783686c4dc837674a2bcf3ca1f3f4858e256195)

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>
Signed-off-by: Saul Wold <sgw@linux.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 e492ce3..4fc5129 100644 (file)
@@ -11,22 +11,26 @@ 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 () {
+    pn = d.getVar('PN', True)
+    packaging = d.getVar('IMAGE_PKGTYPE', True)
+    d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging)
+
     if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
         """
         If package type is not 'srpm' then add tasks to move archive packages of
         configured sources and scripts/logs in ${DEPLOY_DIR}/sources.
         """
-        pn = d.getVar('PN', True)
         d.appendVarFlag('do_compile', 'depends', ' %s:do_archive_configured_sources' %pn)
         build_deps = ' %s:do_archive_configured_sources' %pn
         build_deps += ' %s:do_archive_scripts_logs' %pn
         d.appendVarFlag('do_build', 'depends', build_deps)
+        d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
 
     else:
         d.prependVarFlag('do_configure', 'postfuncs', "do_archive_configured_sources")
index f123caf..3aea4f4 100644 (file)
@@ -11,22 +11,26 @@ 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 () {
+    pn = d.getVar('PN', True)
+    packaging = d.getVar('IMAGE_PKGTYPE', True)
+    d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging)
+
     if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
         """
         If package type is not 'srpm' then add tasks to move archive packages of
         original sources and scripts/logs in ${DEPLOY_DIR}/sources.
         """
-        pn = d.getVar('PN', True)
         d.appendVarFlag('do_patch', 'depends', ' %s:do_archive_original_sources_patches' %pn)
         build_deps = ' %s:do_archive_original_sources_patches' %pn
         build_deps += ' %s:do_archive_scripts_logs' %pn
         d.appendVarFlag('do_build', 'depends', build_deps)
+        d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
 
     else:
         d.prependVarFlag('do_unpack', 'postfuncs', "do_archive_original_sources_patches")
index f9f558e..d7ed6c8 100644 (file)
@@ -11,22 +11,26 @@ 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 () {
+    pn = d.getVar('PN', True)
+    packaging = d.getVar('IMAGE_PKGTYPE', True)
+    d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging)
+
     if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
         """
         If package type is not 'srpm' then add tasks to move archive packages of
         patched sources and scripts/logs in ${DEPLOY_DIR}/sources.
         """
-        pn = d.getVar('PN', True)
         d.appendVarFlag('do_configure', 'depends', ' %s:do_archive_patched_sources' %pn)
         build_deps = ' %s:do_archive_patched_sources' %pn
         build_deps += ' %s:do_archive_scripts_logs' %pn
         d.appendVarFlag('do_build', 'depends', build_deps)
+        d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
 
     else:
         d.prependVarFlag('do_patch', 'postfuncs', "do_archive_patched_sources")