All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai <kai.kang@windriver.com>
To: Quentin Schulz <foss@0leil.net>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] convert-srcuri.py: remove extra spaces before backslash
Date: Thu, 11 Nov 2021 17:58:07 +0800	[thread overview]
Message-ID: <2aa4cdce-e6b6-0740-eabc-2afc06d7ee23@windriver.com> (raw)
In-Reply-To: <A219A85E-A0CE-4F41-A92D-094DEC90E3F1@0leil.net>

On 11/11/21 4:40 PM, Quentin Schulz wrote:
> Hi Kai,
>
> On November 11, 2021 4:48:14 AM GMT+01:00, kai <kai.kang@windriver.com> wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> There may be more than one spaces before backslash in SRC_URI. Strip
> There could technically be tabs too and the current code (even after your patch) does not seem to handle that (from the git context I see in your patch). Maybe a regex would be ok here, using \s* to match as many tabs and spaces as needed. Not sure we care that much but I wanted to raise this so it's known at least.

Thanks for comment. v2 sent.

Kai

>
> Thanks for the patch,
> Cheers
> Quentin
>
>> them otherwise it forges a malformed uri such as open-iscsi-user in
>> meta-openstack:
>>
>> SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https  ;branch=master \
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>> scripts/contrib/convert-srcuri.py | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/contrib/convert-srcuri.py b/scripts/contrib/convert-srcuri.py
>> index 5b362ea2e8..e7a97fdbd4 100755
>> --- a/scripts/contrib/convert-srcuri.py
>> +++ b/scripts/contrib/convert-srcuri.py
>> @@ -36,7 +36,7 @@ def processfile(fn):
>>                          if line.endswith('"\n'):
>>                              line = line.replace('"\n', ';branch=master"\n')
>>                          elif line.endswith(" \\\n"):
>> -                            line = line.replace(' \\\n', ';branch=master \\\n')
>> +                            line = line.replace(' \\\n', '').rstrip() + ';branch=master \\\n'
>>                          modified = True
>>                      if ("git://" in line or "gitsm://" in line) and "github.com" in line and "protocol=https" not in line and matchline(line):
>>                          if "protocol=git" in line:
>> @@ -44,7 +44,7 @@ def processfile(fn):
>>                          elif line.endswith('"\n'):
>>                              line = line.replace('"\n', ';protocol=https"\n')
>>                          elif line.endswith(" \\\n"):
>> -                            line = line.replace(' \\\n', ';protocol=https \\\n')
>> +                            line = line.replace(' \\\n', '').rstrip() + ';protocol=https \\\n'
>>                          modified = True
>>                      new_file.write(line)
>>          if modified:


-- 
Kai Kang
Wind River Linux



      reply	other threads:[~2021-11-11  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  3:48 [PATCH] convert-srcuri.py: remove extra spaces before backslash kai.kang
2021-11-11  8:40 ` [OE-core] " Quentin Schulz
2021-11-11  9:58   ` Kai [this message]

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=2aa4cdce-e6b6-0740-eabc-2afc06d7ee23@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=foss@0leil.net \
    --cc=openembedded-core@lists.openembedded.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 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.