All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-download.mk: do not add a trailing slash to <PKG>_SITE
@ 2018-04-04  6:30 Peter Korsgaard
  2018-04-04  6:40 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2018-04-04  6:30 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/734/7342b25f01d60cafc4a5422a5a1c282629f361c5/

$(dir does not strip last path separator and the wget wrapper adds a '/'
between the -u argument and the filename when it reconstructs the URL,
leading us to have two slashes before the filename when accessing the
upstream location.

Most upstream servers ignores this, but not all - Leading to download issues
from pypi.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-download.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 7ed95f2b2c..2c4ad3ba2c 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -82,7 +82,7 @@ endif
 
 ifeq ($(BR2_PRIMARY_SITE_ONLY),)
 DOWNLOAD_URIS += \
-	-u $($(PKG)_SITE_METHOD)+$(dir $(call qstrip,$(1)))
+	-u $($(PKG)_SITE_METHOD)+$(patsubst %/,%,$(dir $(call qstrip,$(1))))
 ifneq ($(call qstrip,$(BR2_BACKUP_SITE)),)
 DOWNLOAD_URIS += \
 	-u $(call getschemeplusuri,$(call qstrip,$(BR2_BACKUP_SITE)/$($(PKG)_DL_SUBDIR)),urlencode) \
-- 
2.11.0

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

* [Buildroot] [PATCH] pkg-download.mk: do not add a trailing slash to <PKG>_SITE
  2018-04-04  6:30 [Buildroot] [PATCH] pkg-download.mk: do not add a trailing slash to <PKG>_SITE Peter Korsgaard
@ 2018-04-04  6:40 ` Peter Korsgaard
  2018-04-04 22:33   ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2018-04-04  6:40 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes
 > http://autobuild.buildroot.net/results/734/7342b25f01d60cafc4a5422a5a1c282629f361c5/

 > $(dir does not strip last path separator and the wget wrapper adds a '/'
 > between the -u argument and the filename when it reconstructs the URL,
 > leading us to have two slashes before the filename when accessing the
 > upstream location.

 > Most upstream servers ignores this, but not all - Leading to download issues
 > from pypi.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
 > ---
 >  package/pkg-download.mk | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/package/pkg-download.mk b/package/pkg-download.mk
 > index 7ed95f2b2c..2c4ad3ba2c 100644
 > --- a/package/pkg-download.mk
 > +++ b/package/pkg-download.mk
 > @@ -82,7 +82,7 @@ endif
 
 >  ifeq ($(BR2_PRIMARY_SITE_ONLY),)
 >  DOWNLOAD_URIS += \
 > -	-u $($(PKG)_SITE_METHOD)+$(dir $(call qstrip,$(1)))
 > +	-u $($(PKG)_SITE_METHOD)+$(patsubst %/,%,$(dir $(call qstrip,$(1))))

Alternatively I *THINK* we can just use $($(PKG)_SITE) here.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] pkg-download.mk: do not add a trailing slash to <PKG>_SITE
  2018-04-04  6:40 ` Peter Korsgaard
@ 2018-04-04 22:33   ` Arnout Vandecappelle
  2018-04-05  6:35     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2018-04-04 22:33 UTC (permalink / raw)
  To: buildroot



On 04-04-18 08:40, Peter Korsgaard wrote:
>>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> 
>  > Fixes
>  > http://autobuild.buildroot.net/results/734/7342b25f01d60cafc4a5422a5a1c282629f361c5/
> 
>  > $(dir does not strip last path separator and the wget wrapper adds a '/'
>  > between the -u argument and the filename when it reconstructs the URL,
>  > leading us to have two slashes before the filename when accessing the
>  > upstream location.
> 
>  > Most upstream servers ignores this, but not all - Leading to download issues
>  > from pypi.
> 
>  > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
>  > ---
>  >  package/pkg-download.mk | 2 +-
>  >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>  > diff --git a/package/pkg-download.mk b/package/pkg-download.mk
>  > index 7ed95f2b2c..2c4ad3ba2c 100644
>  > --- a/package/pkg-download.mk
>  > +++ b/package/pkg-download.mk
>  > @@ -82,7 +82,7 @@ endif
>  
>  >  ifeq ($(BR2_PRIMARY_SITE_ONLY),)
>  >  DOWNLOAD_URIS += \
>  > -	-u $($(PKG)_SITE_METHOD)+$(dir $(call qstrip,$(1)))
>  > +	-u $($(PKG)_SITE_METHOD)+$(patsubst %/,%,$(dir $(call qstrip,$(1))))
> 
> Alternatively I *THINK* we can just use $($(PKG)_SITE) here.

 No, the <PKG>_PATCH and <PKG>_EXTRA_DOWNLOADS variables may contain full URLs.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH] pkg-download.mk: do not add a trailing slash to <PKG>_SITE
  2018-04-04 22:33   ` Arnout Vandecappelle
@ 2018-04-05  6:35     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-04-05  6:35 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> >  ifeq ($(BR2_PRIMARY_SITE_ONLY),)
 >> >  DOWNLOAD_URIS += \
 >> > -	-u $($(PKG)_SITE_METHOD)+$(dir $(call qstrip,$(1)))
 >> > +	-u $($(PKG)_SITE_METHOD)+$(patsubst %/,%,$(dir $(call qstrip,$(1))))
 >> 
 >> Alternatively I *THINK* we can just use $($(PKG)_SITE) here.

 >  No, the <PKG>_PATCH and <PKG>_EXTRA_DOWNLOADS variables may contain full URLs.

Ahh, yes. It did seem too easy ;)

I'll add a note about this and commit, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2018-04-05  6:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-04  6:30 [Buildroot] [PATCH] pkg-download.mk: do not add a trailing slash to <PKG>_SITE Peter Korsgaard
2018-04-04  6:40 ` Peter Korsgaard
2018-04-04 22:33   ` Arnout Vandecappelle
2018-04-05  6:35     ` Peter Korsgaard

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.