[oe-commits] [openembedded-core] 01/02: package: Add NOPACAGEDFILES variable and new QA check
git at git.openembedded.org
git at git.openembedded.org
Tue Nov 19 16:43:54 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit aa4149ef4b90b99ecf9776c88628ea6b88644090
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Nov 19 16:34:21 2019 +0000
package: Add NOPACAGEDFILES variable and new QA check
Hash Equivalency has introduced a new mode of failure where do_package
reruns with an empty ${D} and injects empty packages into sstate.
We have no sanity checks for this currently and it causes silent corruption
of sstate which is particularly nasty to debug.
This patch adds a test in do_package that there are files to package. In
general its unusual to have no files to package, the one bug exception being
packagegroup recipes.
The new code allows for a NOPACKAGEDFILES variable to be set to indicate
that a recipe really doesn't have any files to be packaged.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/package.bbclass | 3 +++
meta/classes/packagegroup.bbclass | 2 ++
meta/recipes-core/systemd/systemd-compat-units.bb | 1 +
3 files changed, 6 insertions(+)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e0d6ff6..8348d67 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -648,6 +648,9 @@ python perform_packagecopy () {
dest = d.getVar('D')
dvar = d.getVar('PKGD')
+ if not len(os.listdir(dest) )and not d.getVar("NOPACKAGEDFILES"):
+ bb.warn("Recipe %s has no installed files, nothing to package? Set NOPACKAGEDFILES if this is correct to avoid this warning." % d.getVar("PN"))
+
# Start by package population by taking a copy of the installed
# files to operate on
# Preserve sparse files and hard links
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 1541c8f..82dd40d 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -18,6 +18,8 @@ LICENSE ?= "MIT"
inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED') == 'all', 'allarch', '')}
+NOPACKAGEDFILES = "1"
+
# This automatically adds -dbg and -dev flavours of all PACKAGES
# to the list. Their dependencies (RRECOMMENDS) are handled as usual
# by package_depchains in a following step.
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index faa428b..cd62cad 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -11,6 +11,7 @@ S = "${WORKDIR}"
inherit features_check
ALLOW_EMPTY_${PN} = "1"
+NOPACKAGEDFILES = "1"
REQUIRED_DISTRO_FEATURES = "systemd"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list