From: Peter Urbanec <openembedded-devel@urbanec.net>
To: "Bystricky, Juro" <juro.bystricky@intel.com>,
Christopher Larson <clarson@kergoth.com>
Cc: "Purdie, Richard" <richard.purdie@intel.com>,
"bitbake-devel@lists.openembedded.org"
<bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] wget.py: support for semi-colons in URL
Date: Tue, 28 Jul 2015 15:47:17 +1000 [thread overview]
Message-ID: <55B71765.6070901@urbanec.net> (raw)
In-Reply-To: <6E51916E4A1F32428260031F4C7CD2B6101D2743@ORSMSX109.amr.corp.intel.com>
I have not examined the code, but could the URL use the standard URL
encoding mechanism to represent ; as %3B ?
The idea being that the initial "Bitbake URL" is parsed / split using
the original string with semicolons and the URL escaped semicolon is
passed through to a lower layer that uses that part of the string as an
"Internet URL"
Cheers,
Peter
On 28/07/15 02:10, Bystricky, Juro wrote:
> I agree that a generic solution is preferable. I also I think it is only
> prudent to support all valid URLs.
>
> The situation is complicated by the fact that at present it may not be
> possible to determine how to interpret the ‘;’ in SRC_URI.
>
> It can be part of the URL or it can be a SRC_URI delimiter/separator.
>
> As I don’t suppose changing the delimiter character from semi-colon to
> something else (i.e. an unsafe URL character)
>
> is an option, some other changes to the SRC_URI syntax are needed, for
> example:
>
> 1.Some form of escape sequence (i.e. ‘;;’ means treat as ‘;’) in URL, i.e.
>
> SRC_URI =
> "http://abc123.com/git/?p=gcc/gcc.git;;a=snapshot;;h=a5dd47;downloadfilename=abc.tar"
>
> 2.Quoted string implementation, using one of the “unsafe” URL characters
> such as ‘`’, to delimit the URL
>
> SRC_URI = "’
> http://abc123.com/git/?p=gcc/gcc.git;a=snapshot;h=a5dd47`;downloadfilename=abc.tar"
>
> 3.Something else ?
>
> Thanks
>
> Juro
>
> *From:*kergoth@gmail.com [mailto:kergoth@gmail.com] *On Behalf Of
> *Christopher Larson
> *Sent:* Saturday, July 25, 2015 12:15 PM
> *To:* Bystricky, Juro
> *Cc:* bitbake-devel@lists.openembedded.org; Purdie, Richard
> *Subject:* Re: [bitbake-devel] [PATCH] wget.py: support for semi-colons
> in URL
>
> On Sat, Jul 25, 2015 at 11:32 AM, Juro Bystricky
> <juro.bystricky@intel.com <mailto:juro.bystricky@intel.com>> wrote:
>
> Some URLs contain semi-colons. For example, some GIT repositories
> support downloading snapshots using URL such as:
>
> "http://abc123.com/git/?p=gcc/gcc.git;a=snapshot;h=a5dd47"
>
> Currently there is no way to construct SRC_URI with such URLs.
> Bitbake uses semi-colons in SRC_URI as delimiters for various
> parameters.
>
> This patch allows using of semi-colons in URLs: ';;' (double semi-colon)
> in SRC_URI is processed as a single semi-colon that is a part of a
> URL name.
> For example, the above URL would become:
>
> SRC_URI = "http://abc123.com/git/?p=gcc/gcc.git;;a=snapshot;;h=a5dd47"
>
> Note that it is not possible to determine the name of the downloaded
> file
> from URL alone. The onus to specify the proper name is on the user,
> via the parameter 'downloadfilename':
>
> SRC_URI =
> "http://abc123.com/git/?p=gcc/gcc.git;;a=snapshot;;h=a5dd47;downloadfilename=myfile.tar.gz"
>
> Signed-off-by: Juro Bystricky <juro.bystricky@intel.com
> <mailto:juro.bystricky@intel.com>>
>
>
> In my opinion, if we’re going to support this, we should really support
> it in a generic way, in urldecode/urlencode & the URL class, and if
> needed leverage that in wget.
> --
>
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
>
>
>
next prev parent reply other threads:[~2015-07-28 6:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-25 18:32 [PATCH] wget.py: support for semi-colons in URL Juro Bystricky
2015-07-25 19:14 ` Christopher Larson
2015-07-27 16:10 ` Bystricky, Juro
2015-07-27 17:58 ` Christopher Larson
2015-07-27 20:01 ` Richard Purdie
2015-07-28 5:47 ` Peter Urbanec [this message]
2015-07-28 10:57 ` Olof Johansson
2015-07-28 11:00 ` Olof Johansson
2015-07-28 16:06 ` Bystricky, Juro
2015-07-28 19:38 ` Richard Purdie
2015-07-29 18:12 ` Bystricky, Juro
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=55B71765.6070901@urbanec.net \
--to=openembedded-devel@urbanec.net \
--cc=bitbake-devel@lists.openembedded.org \
--cc=clarson@kergoth.com \
--cc=juro.bystricky@intel.com \
--cc=richard.purdie@intel.com \
/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.