From 568cb676ae7b8fa433867e88810b438f4269a14e Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 14 Sep 2022 14:35:39 -0600 Subject: [PATCH] externalsrc: Add trailing slash warnings When setting EXTERNALSRCBUILD or EXTERNALSRC, adding a trailing / should be a warning, but overriding B happens after the warning is checked. So, also do the trailing slash warnings for EXTERNALSRC and EXTERNALSRC_BUILD in the externalsrc class. Signed-off-by: Daniel McGregor --- meta/classes/externalsrc.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index 10d78484d69..6edf80dbdc4 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -37,6 +37,12 @@ python () { if externalsrcbuild and not externalsrcbuild.startswith("/"): bb.error("EXTERNALSRC_BUILD must be an absolute path") + if d.getVar('BB_WORKERCONTEXT') != '1': + if externalsrc and externalsrc[-1] == '/': + bb.warn("EXTERNALSRC must not contain a traling slash, Remove it.") + if externalsrcbuild and externalsrcbuild[-1] == '/': + bb.warn("EXTERNALSRC_BUILD must not contain a traling slash, Remove it.") + # If this is the base recipe and EXTERNALSRC is set for it or any of its # derivatives, then enable BB_DONT_CACHE to force the recipe to always be # re-parsed so that the file-checksums function for do_compile is run every -- 2.47.2