diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-07 16:29:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-16 13:35:10 +0100 |
commit | 0d061fc545d09b5234b8a8fae73ce69a17fa1609 (patch) | |
tree | 8c806f98be81947a399ee364a2072e639386128c /meta/lib | |
parent | 422d55320a79eeb755dd51149e59bb5b1cd788db (diff) | |
download | poky-0d061fc545d09b5234b8a8fae73ce69a17fa1609.tar.gz |
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)
(From OE-Core rev: 7a46226288179df565b7c21c3316672d2e2a1ac0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/signing.py | 4 |
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): | |||
40 | origenv = os.environ.copy() | 40 | origenv = os.environ.copy() |
41 | 41 | ||
42 | for e in os.environ: | 42 | for e in os.environ: |
43 | if builddir in os.environ[e]: | 43 | if builddir + "/" in os.environ[e]: |
44 | os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") | ||
45 | if os.environ[e].endswith(builddir): | ||
44 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) | 46 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) |
45 | 47 | ||
46 | os.chdir(newbuilddir) | 48 | os.chdir(newbuilddir) |