From 392562a21d9f2deb6fe6f8bb5378b09f4c5918d4 Mon Sep 17 00:00:00 2001 From: Kevin Strasser Date: Mon, 11 Mar 2013 15:51:23 -0700 Subject: archiver: fix archive filtering behavior With the addition of sstate, ensure that archiving tasks are only added to the build if they produce output in the directory specified by the 'sstate-inputdirs' flag. Move calls to 'tar_filter' and 'not_tarball' out to archive-*-source.bbclass in order to filter out packages before their archiving tasks are added to the build. Additionally, negate the return value of copyleft_should_include in tar_filter, so that packages that do not pass are in turn filtered out. Signed-off-by: Kevin Strasser Signed-off-by: Saul Wold --- meta/classes/archive-original-source.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'meta/classes/archive-original-source.bbclass') diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass index 2858d33876..1e138ce2fa 100644 --- a/meta/classes/archive-original-source.bbclass +++ b/meta/classes/archive-original-source.bbclass @@ -14,11 +14,15 @@ addtask do_archive_original_sources_patches after do_unpack addtask do_archive_scripts_logs # Get dump date and create diff file -addtask do_dumpdata_create_diff_gz before do_build +addtask do_dumpdata_create_diff_gz python () { pn = d.getVar('PN', True) packaging = d.getVar('IMAGE_PKGTYPE', True) + + if tar_filter(d): + return + d.appendVarFlag('do_dumpdata_create_diff_gz', 'depends', ' %s:do_package_write_' %pn + packaging) if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm': @@ -27,7 +31,9 @@ python () { original sources and scripts/logs in ${DEPLOY_DIR}/sources. """ 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_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) -- cgit 1.2.3-korg