Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
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 13:06:26 +0200	[thread overview]
Message-ID: <20120627110626.GA11927@jama.jama.net> (raw)
In-Reply-To: <1340793253.23146.19.camel@ted>

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

On Wed, Jun 27, 2012 at 11:34:13AM +0100, Richard Purdie wrote:
> 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...

oe-core mirrors.bbclass is using that..
http://git.openembedded.org/openembedded-core/tree/meta/classes/mirrors.bbclass
so maybe someone should fix mirrors.bbclass if this is expected behavior
with new bitbake..

Cheers,

> 
> Cheers,
> 
> Richard
> 
> 
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2012-06-27 11:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1340289297.1640.122.camel@ted>
2012-06-26 17:31 ` (PRE)MIRRORS doesn't work with https?$:// anymore Was: [bitbake-devel] [PATCH] fetch2: Add new mirror syntax to simplify mirror specifications Martin Jansa
2012-06-27 10:34   ` Richard Purdie
2012-06-27 11:06     ` Martin Jansa [this message]
2012-06-27 14:52     ` [PATCH 20/20] fetch: allow regexps in mirror protocol Enrico Scholz
2012-06-27 14:59       ` Robert P. J. Day
2012-06-27 20:35       ` [bitbake-devel] " Richard Purdie
2012-06-28  0:18         ` Enrico Scholz
2012-06-28  0:27           ` Enrico Scholz
2012-06-28 11:42             ` Richard Purdie
2012-06-28 11:43           ` 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=20120627110626.GA11927@jama.jama.net \
    --to=martin.jansa@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox