All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch2/ssh.py: Fix url code for +
@ 2022-04-19 17:42 Robert Yang
  2022-04-20 14:11 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Yang @ 2022-04-19 17:42 UTC (permalink / raw)
  To: bitbake-devel

Fixed when fetch from PREMIRRORS via ssh:
$ bitbake bonnie++ libsigc++-2.0 -cfetch

scp: /paht/to/downloads/libsigc%2B%2B-2.10.7.tar.xz: No such file or directory

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 lib/bb/fetch2/ssh.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py
index 484453088f..2836d7c884 100644
--- a/lib/bb/fetch2/ssh.py
+++ b/lib/bb/fetch2/ssh.py
@@ -70,6 +70,7 @@ class SSH(FetchMethod):
                 "git:// prefix with protocol=ssh", urldata.url)
         m = __pattern__.match(urldata.url)
         path = m.group('path')
+        path = path.replace("%3A", ":").replace("%2B", "+")
         host = m.group('host')
         urldata.localpath = os.path.join(d.getVar('DL_DIR'),
                 os.path.basename(os.path.normpath(path)))
@@ -99,7 +100,7 @@ class SSH(FetchMethod):
 
         if path[0] != '~':
             path = '/%s' % path
-        path = path.replace("%3A", ":")
+        path = path.replace("%3A", ":").replace("%2B", "+")
 
         fr += ':%s' % path
 
@@ -139,7 +140,7 @@ class SSH(FetchMethod):
 
         if path[0] != '~':
             path = '/%s' % path
-        path = path.replace("%3A", ":")
+        path = path.replace("%3A", ":").replace("%2B", "+")
 
         cmd = 'ssh -o BatchMode=true %s %s [ -f %s ]' % (
             portarg,
-- 
2.35.1



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

* Re: [bitbake-devel] [PATCH] fetch2/ssh.py: Fix url code for +
  2022-04-19 17:42 [PATCH] fetch2/ssh.py: Fix url code for + Robert Yang
@ 2022-04-20 14:11 ` Richard Purdie
  2022-04-21  9:08   ` Robert Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2022-04-20 14:11 UTC (permalink / raw)
  To: Robert Yang, bitbake-devel

On Tue, 2022-04-19 at 10:42 -0700, Robert Yang wrote:
> Fixed when fetch from PREMIRRORS via ssh:
> $ bitbake bonnie++ libsigc++-2.0 -cfetch
> 
> scp: /paht/to/downloads/libsigc%2B%2B-2.10.7.tar.xz: No such file or directory
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  lib/bb/fetch2/ssh.py | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py
> index 484453088f..2836d7c884 100644
> --- a/lib/bb/fetch2/ssh.py
> +++ b/lib/bb/fetch2/ssh.py
> @@ -70,6 +70,7 @@ class SSH(FetchMethod):
>                  "git:// prefix with protocol=ssh", urldata.url)
>          m = __pattern__.match(urldata.url)
>          path = m.group('path')
> +        path = path.replace("%3A", ":").replace("%2B", "+")
>          host = m.group('host')
>          urldata.localpath = os.path.join(d.getVar('DL_DIR'),
>                  os.path.basename(os.path.normpath(path)))
> @@ -99,7 +100,7 @@ class SSH(FetchMethod):
>  
>          if path[0] != '~':
>              path = '/%s' % path
> -        path = path.replace("%3A", ":")
> +        path = path.replace("%3A", ":").replace("%2B", "+")
>  
>          fr += ':%s' % path
>  
> @@ -139,7 +140,7 @@ class SSH(FetchMethod):
>  
>          if path[0] != '~':
>              path = '/%s' % path
> -        path = path.replace("%3A", ":")
> +        path = path.replace("%3A", ":").replace("%2B", "+")
>  
>          cmd = 'ssh -o BatchMode=true %s %s [ -f %s ]' % (
>              portarg,

Do we need to be doing some kind of url decode on this?

Cheers,

Richard



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

* Re: [bitbake-devel] [PATCH] fetch2/ssh.py: Fix url code for +
  2022-04-20 14:11 ` [bitbake-devel] " Richard Purdie
@ 2022-04-21  9:08   ` Robert Yang
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Yang @ 2022-04-21  9:08 UTC (permalink / raw)
  To: Richard Purdie, bitbake-devel



On 4/20/22 10:11 PM, Richard Purdie wrote:
> On Tue, 2022-04-19 at 10:42 -0700, Robert Yang wrote:
>> Fixed when fetch from PREMIRRORS via ssh:
>> $ bitbake bonnie++ libsigc++-2.0 -cfetch
>>
>> scp: /paht/to/downloads/libsigc%2B%2B-2.10.7.tar.xz: No such file or directory
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>   lib/bb/fetch2/ssh.py | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py
>> index 484453088f..2836d7c884 100644
>> --- a/lib/bb/fetch2/ssh.py
>> +++ b/lib/bb/fetch2/ssh.py
>> @@ -70,6 +70,7 @@ class SSH(FetchMethod):
>>                   "git:// prefix with protocol=ssh", urldata.url)
>>           m = __pattern__.match(urldata.url)
>>           path = m.group('path')
>> +        path = path.replace("%3A", ":").replace("%2B", "+")
>>           host = m.group('host')
>>           urldata.localpath = os.path.join(d.getVar('DL_DIR'),
>>                   os.path.basename(os.path.normpath(path)))
>> @@ -99,7 +100,7 @@ class SSH(FetchMethod):
>>   
>>           if path[0] != '~':
>>               path = '/%s' % path
>> -        path = path.replace("%3A", ":")
>> +        path = path.replace("%3A", ":").replace("%2B", "+")
>>   
>>           fr += ':%s' % path
>>   
>> @@ -139,7 +140,7 @@ class SSH(FetchMethod):
>>   
>>           if path[0] != '~':
>>               path = '/%s' % path
>> -        path = path.replace("%3A", ":")
>> +        path = path.replace("%3A", ":").replace("%2B", "+")
>>   
>>           cmd = 'ssh -o BatchMode=true %s %s [ -f %s ]' % (
>>               portarg,
> 
> Do we need to be doing some kind of url decode on this?

Yes, I think that's better, I've done a world fetch build after 
urllib.parse.unquote(path).

V2 is coming.

// Robert

> 
> Cheers,
> 
> Richard
> 


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

end of thread, other threads:[~2022-04-21 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 17:42 [PATCH] fetch2/ssh.py: Fix url code for + Robert Yang
2022-04-20 14:11 ` [bitbake-devel] " Richard Purdie
2022-04-21  9:08   ` Robert Yang

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.