]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest/signing: Ensure build path relocation is safe
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2020 15:29:52 +0000 (16:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2020 15:35:54 +0000 (16:35 +0100)
Similarly to 04ee0e8b95cd8ed890374e0007f976684206b630, ensure only full
build paths are replaced in the environment to avoid breaking buildtools.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/signing.py

index 5c4e01b2c36ce26d356273896490df57333101a0..87d3ae6bafe6f23fcde97e3a1c622f762929b018 100644 (file)
@@ -44,8 +44,8 @@ class Signing(OESelftestTestCase):
         origenv = os.environ.copy()
 
         for e in os.environ:
-            if builddir in os.environ[e]:
-                os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
+            if builddir + "/" in os.environ[e]:
+                os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/")
 
         os.chdir(newbuilddir)
         try: