All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch2: fix handling of `\` in file:// SRC_URI
@ 2020-09-23 13:32 Leif Middelschulte
  2020-09-23 15:06 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Leif Middelschulte @ 2020-09-23 13:32 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Leif Middelschulte

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>
---
 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 7ec1fea5..1911ecd3 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
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-10-05 14:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 13:32 [PATCH] fetch2: fix handling of `\` in file:// SRC_URI Leif Middelschulte
2020-09-23 15:06 ` [bitbake-devel] " Richard Purdie
2020-09-23 16:18   ` [PATCH v2 1/2] " Leif Middelschulte
2020-10-05 13:29     ` [bitbake-devel] " Enrico Scholz
2020-10-05 13:42       ` Leif Middelschulte
2020-10-05 14:15         ` Enrico Scholz
2020-09-23 16:18   ` [PATCH v2 2/2] tests/fetch: backslash support in file:// URIs Leif Middelschulte
2020-09-23 20:12     ` [bitbake-devel] " Richard Purdie
2020-09-24  9:46       ` [PATCH v3 1/2] fetch2: fix handling of `\` in file:// SRC_URI Leif Middelschulte
2020-09-24  9:46         ` [PATCH v3 2/2] tests/fetch: backslash support in file:// URIs Leif Middelschulte
2020-09-24 11:14       ` [PATCH v4] fetch2: fix handling of `\` in file:// SRC_URI Leif Middelschulte
2020-09-24 11:14       ` [PATCH v4 1/2] " Leif Middelschulte
2020-09-24 11:14       ` [PATCH v4 2/2] tests/fetch: backslash support in file:// URIs Leif Middelschulte
2020-09-24 13:07       ` [PATCH v5 1/2] fetch2: fix handling of `\` in file:// SRC_URI Leif Middelschulte
2020-09-24 13:07         ` [PATCH v5 2/2] tests/fetch: backslash support in file:// URIs Leif Middelschulte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.