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:34:54 +0100 |
commit | 540b1140a40a229965fcdcb6192eae46de5e31dd (patch) | |
tree | 2172411bfb2dca9bfd579bd00572ac086e9d0ea0 /meta | |
parent | e2b44ea300ec2f0e62e18e9195cbdc70d406d968 (diff) | |
download | poky-540b1140a40a229965fcdcb6192eae46de5e31dd.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)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 b390f37d8e..41627ff858 100644 --- a/meta/lib/oeqa/selftest/cases/signing.py +++ b/meta/lib/oeqa/selftest/cases/signing.py | |||
@@ -44,7 +44,9 @@ class Signing(OESelftestTestCase): | |||
44 | origenv = os.environ.copy() | 44 | origenv = os.environ.copy() |
45 | 45 | ||
46 | for e in os.environ: | 46 | for e in os.environ: |
47 | if builddir in os.environ[e]: | 47 | if builddir + "/" in os.environ[e]: |
48 | os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") | ||
49 | if os.environ[e].endswith(builddir): | ||
48 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) | 50 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) |
49 | 51 | ||
50 | os.chdir(newbuilddir) | 52 | os.chdir(newbuilddir) |