Skip to contentSkip to conversation

selftest/signing: Ensure build path relocation is safe

PATCH Superseded Richard Purdie 1 participant 1 message Sep 7, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftest/signing: Ensure build path relocation is safe

Similarly to 04ee0e8b95cd8ed890374e0007f976684206b630, ensure only full build paths are replaced in the environment to avoid breaking buildtools.

---
 meta/lib/oeqa/selftest/cases/signing.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/signing.py +2 -2
index 202d54994b6..3332bea1b9b 100644
@@ -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:
Signature · 1 line
2.25.1