From: Paul Eggleton Date: Tue, 26 Jan 2016 00:20:24 +0000 (+1300) Subject: gen-lockedsig-cache: fix bad destination path joining X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~27361 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5eb8f15c48b5f39a10eb2b63b026cf1ebfd05533;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git gen-lockedsig-cache: fix bad destination path joining When copying the sstate-cache into the extensible SDK, if the source path had a trailing / and the destination path did not, there would be a missing / between the path and the subdirectory name, and you'd end up with subdirectories like "sstate-cacheCentOS-6.7". There are functions in os.path for this sort of thing so let's just use them and avoid the problem. Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton --- diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache index a4e9dede01e..0986a216515 100755 --- a/scripts/gen-lockedsig-cache +++ b/scripts/gen-lockedsig-cache @@ -41,7 +41,7 @@ for f in files: # Most likely a temp file, skip it print('skipping') continue - dst = f.replace(sys.argv[2], sys.argv[3]) + dst = os.path.join(sys.argv[3], os.path.relpath(f, sys.argv[2])) destdir = os.path.dirname(dst) mkdir(destdir)