]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
insane: Error for S == WORKDIR
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Apr 2024 16:00:20 +0000 (17:00 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 May 2024 21:26:27 +0000 (22:26 +0100)
Where a recipe uses WORKDIR as S, exit with a fatal error since the
code is no longer safe for this layout.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/insane.bbclass

index 03ac06b102f6e773fb02e6b5324ec3ae5636286e..eeef43d00e220971b0c8a062bd177bb69700f355 100644 (file)
@@ -1602,6 +1602,11 @@ python () {
     if prog.search(pn):
         oe.qa.handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
 
+    sourcedir = d.getVar("S")
+    workdir = d.getVar("WORKDIR")
+    if sourcedir == workdir:
+        bb.fatal("Using S = ${WORKDIR} is no longer supported")
+
     # Some people mistakenly use DEPENDS:${PN} instead of DEPENDS and wonder
     # why it doesn't work.
     if (d.getVar(d.expand('DEPENDS:${PN}'))):