]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
sstate: Ensure errors cause task failure
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Jan 2025 17:54:15 +0000 (17:54 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jan 2025 12:13:05 +0000 (12:13 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/sstate.bbclass

index decfb5adefdf07fb7adc070fd28016923fefe0ca..2c259a66579b8fc6135a477e6755f1c9e3d8196c 100644 (file)
@@ -646,6 +646,7 @@ def sstate_package(ss, d):
     d.setVar("SSTATE_CURRTASK", ss['task'])
     bb.utils.remove(sstatebuild, recurse=True)
     bb.utils.mkdirhier(sstatebuild)
+    exit = False
     for state in ss['dirs']:
         if not os.path.exists(state[1]):
             continue
@@ -664,8 +665,11 @@ def sstate_package(ss, d):
                 if not link.startswith(tmpdir):
                     continue
                 bb.error("sstate found an absolute path symlink %s pointing at %s. Please replace this with a relative link." % (srcpath, link))
+                exit = True
         bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0]))
         bb.utils.rename(state[1], sstatebuild + state[0])
+    if exit:
+        bb.fatal("Failing task due to absolute path symlinks")
 
     workdir = d.getVar('WORKDIR')
     sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared")