All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Patrick Williams" <patrick@stwcx.xyz>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] fetch2/wget: include paramters in URL
Date: Tue, 29 Dec 2020 15:05:25 -0600	[thread overview]
Message-ID: <X+uaFU9gEOZPW6xD@heinlein> (raw)
In-Reply-To: <20201229151316.165171-1-patrick@stwcx.xyz>

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

On Tue, Dec 29, 2020 at 09:13:16AM -0600, Patrick Williams wrote:
> The wget fetcher currently silently drops all parameters and has
> been that way since it was originally introduced in fetch via 080eb8764.
> This prevents use in SOURCE_MIRROR_URL and SRC_URI which require
> additional parameters.
> 
> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
> ---
>  lib/bb/fetch2/wget.py | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
> index e6d9f528..d41d7408 100644
> --- a/lib/bb/fetch2/wget.py
> +++ b/lib/bb/fetch2/wget.py
> @@ -99,7 +99,13 @@ class Wget(FetchMethod):
>          if ud.user and ud.pswd:
>              fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd)
>  
> -        uri = ud.url.split(";")[0]
> +        # Join the URL components together.
> +        urls = ud.url.split(";")
> +        if len(urls) == 1:
> +            uri = urls[0]
> +        else:
> +            uri = urls[0] + "?" + "&".join(urls[1:])
> +
>          if os.path.exists(ud.localpath):
>              # file exists, but we didnt complete it.. trying again..
>              fetchcmd += d.expand(" -c -P ${DL_DIR} '%s'" % uri)
> -- 
> 2.26.2
> 

This causes some problems that I need to work out more.  In my downloads
directory I ended up with files like:

    'libxml2-2.9.10.tar.gz?name=libtar'
    'libxml2-2.9.10.tar.gz?name=libtar.1'

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

  reply	other threads:[~2020-12-29 21:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 15:13 [PATCH] fetch2/wget: include paramters in URL Patrick Williams
2020-12-29 21:05 ` Patrick Williams [this message]
2020-12-29 21:16 ` [PATCH v2] fetch2/wget: include parameters " Patrick Williams
2020-12-29 21:57 ` [PATCH v3] " Patrick Williams
2020-12-29 22:02   ` Patrick Williams
2020-12-30 22:03 ` [PATCH v4] " Patrick Williams
2020-12-30 22:06   ` Patrick Williams

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=X+uaFU9gEOZPW6xD@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=bitbake-devel@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.