]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
package.bbclass: correct check for /build in copydebugsources()
authorPeter Marko <peter.marko@siemens.com>
Fri, 14 Apr 2023 15:32:13 +0000 (17:32 +0200)
committerSteve Sakoman <steve@sakoman.com>
Fri, 14 Apr 2023 17:19:08 +0000 (07:19 -1000)
Newly introduced kirkstone-only commit
https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=80839835ec9fcb63069289225a3c1af257ffdef7
broke builds with externalsrc in Gitlab-CI.
This is yocto-4.0.9 regression.

It checks if directory starts with "build" instead of
if checking if it equals to "build".
Gitlab-CI uses directory "/builds" which matches the check
but directory /build does not exist, only /builds.
After successful check it tries to move this non-existent
directory which does not exists and thus do_package fails.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/package.bbclass

index 2950218145bfcb38a5e7a423ac435e602df19b2e..67acc278d13c0cf28f8cb3f7adc6ba1f8c1411de 100644 (file)
@@ -638,7 +638,7 @@ def copydebugsources(debugsrcdir, sources, d):
             if os.path.exists(dvar + debugsrcdir + sdir):
                 # Special case for /build since we need to move into
                 # /usr/src/debug/build so rename sdir to build.build
-                if sdir.find("/build") == 0:
+                if sdir == "/build" or sdir.find("/build/") == 0:
                     cmd = "mv %s%s%s %s%s%s" % (dvar, debugsrcdir, "/build", dvar, debugsrcdir, "/build.build")
                     subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
                     sdir = sdir.replace("/build", "/build.build", 1)