summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-07 16:29:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-08 14:39:17 +0100
commit7a46226288179df565b7c21c3316672d2e2a1ac0 (patch)
tree74edbccdad6ba604bf77e39cd48f8e4fced7188e
parent848af99b4e6afda0658db44128a6921217653e95 (diff)
downloadopenembedded-core-contrib-7a46226288179df565b7c21c3316672d2e2a1ac0.tar.gz
openembedded-core-contrib-7a46226288179df565b7c21c3316672d2e2a1ac0.tar.bz2
openembedded-core-contrib-7a46226288179df565b7c21c3316672d2e2a1ac0.zip
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. (From OE-Core rev: be07d93a4f59d4563f2d064be1997b39f05e9f0e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index 4fa99acbc9..8d585430be 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -40,7 +40,9 @@ class Signing(OESelftestTestCase):
origenv = os.environ.copy()
for e in os.environ:
- if builddir in os.environ[e]:
+ if builddir + "/" in os.environ[e]:
+ os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/")
+ if os.environ[e].endswith(builddir):
os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
os.chdir(newbuilddir)