There's no point doing the backend check if we're going to ignore it,
so check INSANE_SKIP first.

Signed-off-by: Ross Burton <[email protected]>
---
 meta/classes-recipe/setuptools3.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/setuptools3.bbclass 
b/meta/classes-recipe/setuptools3.bbclass
index 0bbe3780231..b29152e7664 100644
--- a/meta/classes-recipe/setuptools3.bbclass
+++ b/meta/classes-recipe/setuptools3.bbclass
@@ -13,6 +13,9 @@ SETUPTOOLS_BUILD_ARGS ?= ""
 SETUPTOOLS_SETUP_PATH ?= "${S}"
 
 python do_check_backend() {
+    if "pep517-backend" in (d.getVar("INSANE_SKIP") or "").split():
+        return
+
     import re
     filename = d.expand("${SETUPTOOLS_SETUP_PATH}/pyproject.toml")
     if os.path.exists(filename):
@@ -21,8 +24,7 @@ python do_check_backend() {
             if not match: continue
 
             msg = f"inherits setuptools3 but has pyproject.toml with 
{match[1]}, use the correct class"
-            if "pep517-backend" not in (d.getVar("INSANE_SKIP") or "").split():
-                oe.qa.handle_error("pep517-backend", msg, d)
+            oe.qa.handle_error("pep517-backend", msg, d)
     oe.qa.exit_if_errors(d)
 }
 addtask check_backend after do_patch before do_configure
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#243127): 
https://lists.openembedded.org/g/openembedded-core/message/243127
Mute This Topic: https://lists.openembedded.org/mt/120683137/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to