Patchwork [1/2] archive-*-source.bbclass: fix scripts_with_logs build error

login
register
mail settings
Submitter Kevin Strasser
Date March 11, 2013, 10:51 p.m.
Message ID <ef21fcf1adf6da74d0770982070dfc78db886154.1363041436.git.kevin.strasser@linux.intel.com>
Download mbox | patch
Permalink /patch/46005/
State Accepted
Commit 6b8ed0660fad4c4229bf991968ac98b8c715b3a8
Headers show

Comments

Kevin Strasser - March 11, 2013, 10:51 p.m.
Log and script archives are only generated when explicitly enabled by
setting the environment variable SOURCE_ARCHIVE_LOG_WITH_SCRIPTS to
'logs_with_scripts'. When left disabled, the path specified to be
handled by sstate is never created, resulting in a build error.

Only attempt to archive scripts and logs when explicitly enabled.

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
---
 meta/classes/archive-configured-source.bbclass |    5 +++--
 meta/classes/archive-original-source.bbclass   |    5 +++--
 meta/classes/archive-patched-source.bbclass    |    5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
index 4fc5129..2738cab 100644
--- a/meta/classes/archive-configured-source.bbclass
+++ b/meta/classes/archive-configured-source.bbclass
@@ -28,9 +28,10 @@  python () {
         """
         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
+        if d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True) == 'logs_with_scripts':
+            build_deps += ' %s:do_archive_scripts_logs' %pn
+            d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
         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")
diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass
index 3aea4f4..2858d33 100644
--- a/meta/classes/archive-original-source.bbclass
+++ b/meta/classes/archive-original-source.bbclass
@@ -28,9 +28,10 @@  python () {
         """
         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
+        if d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True) == 'logs_with_scripts':
+            build_deps += ' %s:do_archive_scripts_logs' %pn
+            d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
         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")
diff --git a/meta/classes/archive-patched-source.bbclass b/meta/classes/archive-patched-source.bbclass
index d7ed6c8..b47d36c 100644
--- a/meta/classes/archive-patched-source.bbclass
+++ b/meta/classes/archive-patched-source.bbclass
@@ -28,9 +28,10 @@  python () {
         """
         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
+        if d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True) == 'logs_with_scripts':
+            build_deps += ' %s:do_archive_scripts_logs' %pn
+            d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
         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")