From 906644c09e80ebc78aafcb6b9bf83123d2e31f57 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 7 Sep 2020 16:29:52 +0100 Subject: 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: fcd0a9683af1a9155eabbd9056e3b46d4a931b2e) Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/signing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py index 202d54994b..a28c7eb19a 100644 --- a/meta/lib/oeqa/selftest/cases/signing.py +++ b/meta/lib/oeqa/selftest/cases/signing.py @@ -44,7 +44,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) -- cgit v1.2.3-54-g00ecf