summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorKevin Strasser <kevin.strasser@linux.intel.com>2013-03-22 13:19:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-03 16:54:03 +0100
commit0c80286a3383b436a0a63a0b00eb357dd9dea4fb (patch)
tree394cb4b870afee712d6a5b0bc4ca7708762f2632 /meta/classes
parent1416613e94af46c6e74532bca0f026d1540becbb (diff)
downloadopenembedded-core-0c80286a3383b436a0a63a0b00eb357dd9dea4fb.tar.gz
openembedded-core-0c80286a3383b436a0a63a0b00eb357dd9dea4fb.tar.bz2
openembedded-core-0c80286a3383b436a0a63a0b00eb357dd9dea4fb.zip
archiver: fix srpm archiving build errors
srpm archiving doesn't need to be handled as a different case when deciding what archive tasks to add. When srpm is selected as the archiving type, the scripts and logs archive staging directory ${WORKDIR}/script-logs is cleaned, and its contents moved out to ${WORKDIR}. Now that we are including ${WORKDIR}/script-logs in sstate-inputdirs, the directory must be preserved. [YOCTO #4032] Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/archive-configured-source.bbclass25
-rw-r--r--meta/classes/archive-original-source.bbclass25
-rw-r--r--meta/classes/archive-patched-source.bbclass25
-rw-r--r--meta/classes/archiver.bbclass4
4 files changed, 27 insertions, 52 deletions
diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
index 0f2c9ee329..d346f69e29 100644
--- a/meta/classes/archive-configured-source.bbclass
+++ b/meta/classes/archive-configured-source.bbclass
@@ -24,24 +24,17 @@ python () {
return
d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging)
+ build_deps = ' %s:do_dumpdata_create_diff_gz' %pn
- 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.
- """
+ if d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True) == 'logs_with_scripts':
+ d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
+ build_deps += ' %s:do_archive_scripts_logs' %pn
+
+ if not not_tarball(d):
d.appendVarFlag('do_compile', 'depends', ' %s:do_archive_configured_sources' %pn)
- build_deps = ' %s:do_dumpdata_create_diff_gz' %pn
- if not not_tarball(d):
- build_deps += ' %s:do_archive_configured_sources' %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)
-
- else:
- d.prependVarFlag('do_configure', 'postfuncs', "do_archive_configured_sources")
- d.prependVarFlag('do_package_write_rpm', 'prefuncs', "do_archive_scripts_logs")
+ build_deps += ' %s:do_archive_configured_sources' %pn
+
+ d.appendVarFlag('do_build', 'depends', build_deps)
}
ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/"
diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass
index 1e138ce2fa..7258293c93 100644
--- a/meta/classes/archive-original-source.bbclass
+++ b/meta/classes/archive-original-source.bbclass
@@ -24,24 +24,17 @@ python () {
return
d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging)
+ build_deps = ' %s:do_dumpdata_create_diff_gz' %pn
- 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.
- """
+ if d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True) == 'logs_with_scripts':
+ d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
+ build_deps += ' %s:do_archive_scripts_logs' %pn
+
+ if not not_tarball(d):
d.appendVarFlag('do_patch', 'depends', ' %s:do_archive_original_sources_patches' %pn)
- build_deps = ' %s:do_dumpdata_create_diff_gz' %pn
- if not not_tarball(d):
- build_deps += ' %s:do_archive_original_sources_patches' %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)
-
- else:
- d.prependVarFlag('do_unpack', 'postfuncs', "do_archive_original_sources_patches")
- d.prependVarFlag('do_package_write_rpm', 'prefuncs', "do_archive_scripts_logs")
+ build_deps += ' %s:do_archive_original_sources_patches' %pn
+
+ d.appendVarFlag('do_build', 'depends', build_deps)
}
ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/"
diff --git a/meta/classes/archive-patched-source.bbclass b/meta/classes/archive-patched-source.bbclass
index ac6d2c39f1..9e5ec74f45 100644
--- a/meta/classes/archive-patched-source.bbclass
+++ b/meta/classes/archive-patched-source.bbclass
@@ -24,24 +24,17 @@ python () {
return
d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging)
+ build_deps = ' %s:do_dumpdata_create_diff_gz' %pn
- 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.
- """
+ if d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True) == 'logs_with_scripts':
+ d.appendVarFlag('do_archive_scripts_logs', 'depends', ' %s:do_package_write_' %pn + packaging)
+ build_deps += ' %s:do_archive_scripts_logs' %pn
+
+ if not not_tarball(d):
d.appendVarFlag('do_configure', 'depends', ' %s:do_archive_patched_sources' %pn)
- build_deps = ' %s:do_dumpdata_create_diff_gz' %pn
- if not not_tarball(d):
- build_deps += ' %s:do_archive_patched_sources' %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)
-
- else:
- d.prependVarFlag('do_patch', 'postfuncs', "do_archive_patched_sources")
- d.prependVarFlag('do_package_write_rpm', 'prefuncs', "do_archive_scripts_logs")
+ build_deps += ' %s:do_archive_patched_sources' %pn
+
+ d.appendVarFlag('do_build', 'depends', build_deps)
}
ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/"
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index ed07b2edb8..6749d61678 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -440,10 +440,6 @@ def archive_scripts_logs(d):
tarlog = archive_logs(d, logdir, True)
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
- if os.path.exists(work_dir+ '/' + tarlog):
- os.remove(work_dir+ '/' + tarlog)
- shutil.move(os.path.join(logdir, '..', tarlog), work_dir)
- shutil.rmtree(os.path.join(work_dir,'script-logs'))
store_package(d, tarlog)
def dumpdata(d):