Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id 444A46004D for ; Mon, 8 Jul 2019 23:01:29 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id x68N1SvH023457 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 8 Jul 2019 16:01:29 -0700 (PDT) Received: from soho-mhatle-m.local (172.25.36.226) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.439.0; Mon, 8 Jul 2019 16:01:28 -0700 To: Ankur Tyagi References: <20190704044603.9943-1-ankur.tyagi85@gmail.com> From: Mark Hatle Openpgp: preference=signencrypt Autocrypt: addr=mark.hatle@windriver.com; prefer-encrypt=mutual; keydata= mQENBFYKxFgBCACt/pzutBp6p/xVKTFJjHbM3KpQKCblyot/YP+bpTr51Hrc5xDXBQhoG7TC aIRvRIvbhEevEQK9y04gW3JK/5lobq5ORebolcsHlYBUvpNeIPjupLQwGvz/TPtrLRNGLqDC rvsM6OA2XbQ2bwzxWaSQS3ImE2O2iXOZn9HhThMGeDB4Nff3fgUvXOTDIrgWOn9K2DgLL7Yc zkUIlFdj+Nraksd/7BSk8oH6tjeBVhFqSFvKta9QxWgdr58oPaTYaW/xNqUjlLrbJuMw/MSe xzuYfdfDfm6J8kRjMOnwQ0n8svJElzqAk+d83ow38gpGQ+LkjGgnf8ZFJ4rUJFADroX3ABEB AAG0JU1hcmsgSGF0bGUgPG1hcmsuaGF0bGVAd2luZHJpdmVyLmNvbT6JATcEEwEIACEFAlYK xFgCGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQfv796/r0vvlvZAf9Gs+eN320yhRW V/fZCsngKhmOK4v3HrTwFrkSmoD9QHQiE/5IPdNacHwIPwZx07tNBohB8xOeNqCPRYRBwGhA AnxKOPyd0nnm6ZhPzbA57v4x3IGRQr4QzvcBTASJq91l3Ew4lpAslyx5w1DPPqRD7G8ycDKg peKyDwmdkvCunVisSAQI3XIMq2y230biTO98tDPEezg+lg+yTsz9ZT33F5KNuWrpf8VL5fG/ mt+kAv7wtsx/KTRbqhH3iFXF6eBSwMjAfTXFlkLfbM9riJGXrWEl9n2S2R3cDHNHug0lb8f4 whK370KEO4OwRKIYW/VUBmzk5XZUE9DTlDSV8ycsrrkBDQRWCsRYAQgAwK3FuHCE+HW3YWdH PUjeSn5p//xJ57u8g2rng8zm9zNjmYgpPv5UxozaD9i2jf4mlQLHGGOezhHae8K4Nj70oVcv 8AmwcrJa9i9WL1oy/9R3fHMWf/Ctt9VXTO0qlCuq6PDzaUfvsXR61aJIjTKNQTOjCLjY1vXm VSewUgARysmA8WrjTfwGBihMBxAX0+kIjx8nOlam0WvekMBXZ0AbS56oTLRxYao6DI3GeB/N oWPy/5DfuTKaSdM0Pf8al20x9RuNN5/HLMlyDH/k8bIa1xd9aAqW+Feiw5gC107V2E6ULyIy q6em2UrsmIRxrvpHqbNgQKqvTehJ+V/i4g/uOwARAQABiQEfBBgBCAAJBQJWCsRYAhsMAAoJ EH7+/ev69L755XAH/3ZcNhooqd9OBhFkvXm1iWZ8EoC7motWqVn2oEyxoonsg8AD9kFXiN+T dYp7dH99EZu9q4ptj56AXm4uHzOgywL/5/V2TY6twCGAjUGzDjAB5gzoi+JLIBlDiyOip0eL QswIhRk473xy3j8DA4oVamnSPWgyNJ+qsdt37YWDzoDFFvtDoRU7Eb+znfIMDKzlny0XU/8L cW1bNHJlpv/78GPdfP4tjysEd8MuA5jf5o5w4XqcwTqalffEJtQ/s3pbkstEi7qm5uPui5Kt gq6YYLSqcSNe0GWAF9/T+qwyo7burSTxUWCWtMmlXdAQLW9SynLhB3Jbch0nFAh0fCKi6yY= Organization: Wind River Systems Message-ID: Date: Mon, 8 Jul 2019 18:01:27 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Cc: bitbake-devel@lists.openembedded.org Subject: Re: [bitbake-devel, 1.42, 1.40, v2] git.py: Handle space in git repo name for http/https protocol X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jul 2019 23:01:29 -0000 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit On 7/8/19 4:12 PM, Ankur Tyagi wrote: > We are using TFS in our company and within TFS we have different > project names that can have spaces. > With new version of TFS, git repo can also be created inside it and > the path of those repo also includes the project name that can have > space. Yes, spaces are valid. I don't dispute that.. but however are you entering them? > Hence the SRC_URI will have a space and that's when I started seeing errors. SRC_URI = "https://foo.com/bar foobar bar" That will result in -three- entries: https://foo.com/bar foobar bar The later two are invalid, because SRC_URI is split on whitespace (spaces and tabs.) So what I don't understand is how are spaces being entered into the SRC_URI (other then with %20) unless they are coming in via gitsm? --Mark > Hope it answers your question > > regards > Ankur > > On Tue, Jul 9, 2019 at 6:28 AM Mark Hatle wrote: >> >> How is a space being added? I'm a bit confused by this. Is it due to the gitsm >> fetching? or has someone figured out a way in SRC_URI to included spaces? >> >> If it's only in the gitsm fetching, then maybe we need to do the conversion >> there instead. >> >> --Mark >> >> On 7/3/19 11:46 PM, Ankur Tyagi wrote: >>> Signed-off-by: Ankur Tyagi >>> --- >>> lib/bb/fetch2/git.py | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py >>> index 59a2ee8f..a8fcc2bf 100644 >>> --- a/lib/bb/fetch2/git.py >>> +++ b/lib/bb/fetch2/git.py >>> @@ -156,6 +156,9 @@ class Git(FetchMethod): >>> if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): >>> raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) >>> >>> + if ud.proto in ('http', 'https'): >>> + ud.path = ud.path.replace(" ", "%20") >>> + >>> ud.nocheckout = ud.parm.get("nocheckout","0") == "1" >>> >>> ud.rebaseable = ud.parm.get("rebaseable","0") == "1" >>> >>