aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Middelschulte <leif.middelschulte@klsmartin.com>2020-09-24 15:07:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-24 22:34:42 +0100
commitaa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11 (patch)
treeb5f98f8398accb73d7a0e8517327caab2975c815
parentac7d1114a7e99e6efd6a37b03d170faf678513fb (diff)
downloadbitbake-aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11.tar.gz
fetch2: fix handling of `\` in file:// SRC_URI
Using backslashes in file:// URIs was broken. Either the resolver would fail or the subsequent `cp` command. Try to avoid this by putting the filenames into quotes. Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161 Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 7ec1fea5d..551bfb70f 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1520,7 +1520,7 @@ class FetchMethod(object):
if urlpath.find("/") != -1:
destdir = urlpath.rsplit("/", 1)[0] + '/'
bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
- cmd = 'cp -fpPRH %s %s' % (file, destdir)
+ cmd = 'cp -fpPRH "%s" "%s"' % (file, destdir)
if not cmd:
return