From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>,
openembedded-core@lists.openembedded.org
Subject: Re: (PRE)MIRRORS doesn't work with https?$:// anymore Was: [PATCH] fetch2: Add new mirror syntax to simplify mirror specifications
Date: Wed, 27 Jun 2012 11:34:13 +0100 [thread overview]
Message-ID: <1340793253.23146.19.camel@ted> (raw)
In-Reply-To: <20120626173118.GB3169@jama.jama.net>
On Tue, 2012-06-26 at 19:31 +0200, Martin Jansa wrote:
> On Thu, Jun 21, 2012 at 03:34:57PM +0100, Richard Purdie wrote:
> > When writing mirror specifications, the current regexp syntax can be awkward
> > and hard to get it to do what you want. For example, extracting the 'basename'
> > of a repository:
> >
> > PREMIRRORS = "git://.*/([^/]+/)*([^/]*) git://somewhere.org/somedir/\\2;protocol=file"
> >
> > can now become:
> >
> > PREMIRRORS = "git://.*/.* git://somewhere.org/somedir/BASENAME;protocol=file"
> >
> > which is much clearer. A MIRRORNAME substitution is also added which contains
> > an encoded form of both host and path. One of the problems with the existing
> > regexp syntax is you couldn't access HOST information from PATH and vice-versa
> > which is an issue this patch also addresses.
>
> One of this fetch2 patches break https?:// in MIRRORS
>
> It's used e.g in openembedded-core/meta/classes/mirrors.bbclass:
> https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/
> https?$://.*/.* http://sources.openembedded.org/
>
> I've tested it with older bitbake in PREMIRRORS (to make log.do_fetch
> log shorter) on libcap (which doesn't exist on upstream URL).
>
> PREMIRRORS_append () {
> cvs://.*/.* http://build.shr-project.org/sources/
> svn://.*/.* http://build.shr-project.org/sources/
> git://.*/.* http://build.shr-project.org/sources/
> hg://.*/.* http://build.shr-project.org/sources/
> bzr://.*/.* http://build.shr-project.org/sources/
> https?$://.*/.* http://build.shr-project.org/sources/
> }
This is almost certainly a result of:
http://git.openembedded.org/bitbake/commit/?id=604df1b25cf114e083f52917df2df64e01279c25
since I didn't believe anyone was using the regexp syntax in the base
url type. The bug I wanted to fix was where if you did:
https://.*/.* file:///some/path/
which seems reasonable enough, it would access:
files:///some/path/
which is clearly not what anyone would want.
I'm not sure what to do about fixing this...
Cheers,
Richard
WARNING: multiple messages have this Message-ID (diff)
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>,
openembedded-core@lists.openembedded.org
Subject: Re: (PRE)MIRRORS doesn't work with https?$:// anymore Was: [bitbake-devel] [PATCH] fetch2: Add new mirror syntax to simplify mirror specifications
Date: Wed, 27 Jun 2012 11:34:13 +0100 [thread overview]
Message-ID: <1340793253.23146.19.camel@ted> (raw)
In-Reply-To: <20120626173118.GB3169@jama.jama.net>
On Tue, 2012-06-26 at 19:31 +0200, Martin Jansa wrote:
> On Thu, Jun 21, 2012 at 03:34:57PM +0100, Richard Purdie wrote:
> > When writing mirror specifications, the current regexp syntax can be awkward
> > and hard to get it to do what you want. For example, extracting the 'basename'
> > of a repository:
> >
> > PREMIRRORS = "git://.*/([^/]+/)*([^/]*) git://somewhere.org/somedir/\\2;protocol=file"
> >
> > can now become:
> >
> > PREMIRRORS = "git://.*/.* git://somewhere.org/somedir/BASENAME;protocol=file"
> >
> > which is much clearer. A MIRRORNAME substitution is also added which contains
> > an encoded form of both host and path. One of the problems with the existing
> > regexp syntax is you couldn't access HOST information from PATH and vice-versa
> > which is an issue this patch also addresses.
>
> One of this fetch2 patches break https?:// in MIRRORS
>
> It's used e.g in openembedded-core/meta/classes/mirrors.bbclass:
> https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/
> https?$://.*/.* http://sources.openembedded.org/
>
> I've tested it with older bitbake in PREMIRRORS (to make log.do_fetch
> log shorter) on libcap (which doesn't exist on upstream URL).
>
> PREMIRRORS_append () {
> cvs://.*/.* http://build.shr-project.org/sources/
> svn://.*/.* http://build.shr-project.org/sources/
> git://.*/.* http://build.shr-project.org/sources/
> hg://.*/.* http://build.shr-project.org/sources/
> bzr://.*/.* http://build.shr-project.org/sources/
> https?$://.*/.* http://build.shr-project.org/sources/
> }
This is almost certainly a result of:
http://git.openembedded.org/bitbake/commit/?id=604df1b25cf114e083f52917df2df64e01279c25
since I didn't believe anyone was using the regexp syntax in the base
url type. The bug I wanted to fix was where if you did:
https://.*/.* file:///some/path/
which seems reasonable enough, it would access:
files:///some/path/
which is clearly not what anyone would want.
I'm not sure what to do about fixing this...
Cheers,
Richard
next prev parent reply other threads:[~2012-06-27 10:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 14:34 [PATCH] fetch2: Add new mirror syntax to simplify mirror specifications Richard Purdie
2012-06-26 17:31 ` (PRE)MIRRORS doesn't work with https?$:// anymore Was: " Martin Jansa
2012-06-26 17:31 ` (PRE)MIRRORS doesn't work with https?$:// anymore Was: [bitbake-devel] " Martin Jansa
2012-06-27 10:34 ` Richard Purdie [this message]
2012-06-27 10:34 ` Richard Purdie
2012-06-27 11:06 ` (PRE)MIRRORS doesn't work with https?$:// anymore Was: " Martin Jansa
2012-06-27 11:06 ` (PRE)MIRRORS doesn't work with https?$:// anymore Was: [bitbake-devel] " Martin Jansa
2012-06-27 14:52 ` [PATCH 20/20] fetch: allow regexps in mirror protocol Enrico Scholz
2012-06-27 14:59 ` [OE-core] " Robert P. J. Day
2012-06-27 14:59 ` Robert P. J. Day
2012-06-27 20:35 ` Richard Purdie
2012-06-27 20:35 ` [bitbake-devel] " Richard Purdie
2012-06-28 0:18 ` Enrico Scholz
2012-06-28 0:18 ` [bitbake-devel] " Enrico Scholz
2012-06-28 0:27 ` Enrico Scholz
2012-06-28 0:27 ` [bitbake-devel] " Enrico Scholz
2012-06-28 11:42 ` Richard Purdie
2012-06-28 11:42 ` [bitbake-devel] " Richard Purdie
2012-06-28 11:43 ` Richard Purdie
2012-06-28 11:43 ` [bitbake-devel] " Richard Purdie
2012-06-27 14:54 ` (PRE)MIRRORS doesn't work with https?$:// anymore Was: [bitbake-devel] [PATCH] fetch2: Add new mirror syntax to simplify mirror specifications Enrico Scholz
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=1340793253.23146.19.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=martin.jansa@gmail.com \
--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.