diff options
Diffstat (limited to 'meta/classes/archive-configured-source.bbclass')
-rw-r--r-- | meta/classes/archive-configured-source.bbclass | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass index 1eaaf4cf25..e492ce300d 100644 --- a/meta/classes/archive-configured-source.bbclass +++ b/meta/classes/archive-configured-source.bbclass @@ -8,10 +8,53 @@ inherit archiver # Get archiving package with configured sources including patches -do_configure[postfuncs] += "do_archive_configured_sources " +addtask do_archive_configured_sources after do_configure # Get archiving package with temp(logs) and scripts(.bb and inc files) -do_package_write_rpm[prefuncs] += "do_archive_scripts_logs " +addtask do_archive_scripts_logs after do_package_write_rpm # Get dump date and create diff file -do_package_write_rpm[postfuncs] += "do_dumpdata_create_diff_gz " +addtask do_dumpdata_create_diff_gz after do_package_write_rpm before do_build + +python () { + 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) + + else: + d.prependVarFlag('do_configure', 'postfuncs', "do_archive_configured_sources") + d.prependVarFlag('do_package_write_rpm', 'prefuncs', "do_archive_scripts_logs") +} + +ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/" +ARCHIVE_SSTATE_SCRIPTS_LOGS_INDIR = "${WORKDIR}/script-logs/" +ARCHIVE_SSTATE_DIFFGZ_ENVDATA_INDIR = "${WORKDIR}/diffgz-envdata/" + +SSTATETASKS += "do_archive_scripts_logs" +do_archive_scripts_logs[sstate-name] = "archive_scripts_logs" +do_archive_scripts_logs[sstate-inputdirs] = "${ARCHIVE_SSTATE_SCRIPTS_LOGS_INDIR}" +do_archive_scripts_logs[sstate-outputdirs] = "${ARCHIVE_SSTATE_OUTDIR}" + +python do_archive_scripts_logs_setscene () { + sstate_setscene(d) +} + +addtask do_archive_scripts_logs_setscene + +SSTATETASKS += "do_dumpdata_create_diff_gz" +do_dumpdata_create_diff_gz[sstate-name] = "dumpdata_create_diff_gz" +do_dumpdata_create_diff_gz[sstate-inputdirs] = "${ARCHIVE_SSTATE_DIFFGZ_ENVDATA_INDIR}" +do_dumpdata_create_diff_gz[sstate-outputdirs] = "${ARCHIVE_SSTATE_OUTDIR}" + +python do_dumpdata_create_diff_gz_setscene () { + sstate_setscene(d) +} + +addtask do_dumpdata_create_diff_gz_setscene |