public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Andrei Gherzan" <andrei@gherzan.com>
To: openembedded-core@lists.openembedded.org
Cc: andrei@gherzan.com,
	Leif Middelschulte <leif.middelschulte@klsmartin.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
Date: Mon, 23 Aug 2021 14:52:49 +0100	[thread overview]
Message-ID: <20210823135250.767173-1-andrei@gherzan.com> (raw)

From: Leif Middelschulte <leif.middelschulte@klsmartin.com>

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

(Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)

Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 bitbake/lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index dc99914cd9..ece07f611c 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1525,7 +1525,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.31.1


             reply	other threads:[~2021-08-23 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 13:52 Andrei Gherzan [this message]
2021-08-23 13:52 ` [dunfell][PATCH 2/2] Use the label provided when formating a dos partition Andrei Gherzan
2021-08-24 14:20 ` [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Steve Sakoman
2021-08-24 14:24   ` Richard Purdie
2021-08-24 15:25     ` Andrei Gherzan
     [not found]     ` <169E47906AF45A5C.6361@lists.openembedded.org>
2021-08-31 12:45       ` Andrei Gherzan
2021-08-31 13:03         ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210823135250.767173-1-andrei@gherzan.com \
    --to=andrei@gherzan.com \
    --cc=leif.middelschulte@klsmartin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox