]> code.ossystems Code Review - openembedded-core.git/commit
(PRE)MIRRORS: fix pattern for npm:// without slash
authorOlaf Mandel <o.mandel@menlosystems.com>
Fri, 25 Aug 2017 17:01:57 +0000 (17:01 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Sep 2017 15:52:06 +0000 (16:52 +0100)
commit1f5675a43e1781635fee15cc3674143c195da169
tree12fc1df78fe352f3efad0871a02a970d3bb002cd
parent8b0c5abe824647c6c9205ecedd29c3ac54c423a5
(PRE)MIRRORS: fix pattern for npm:// without slash

For URIs with the npm:// transport but with no other slash in it, the
common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match.
Make the last slash in the pattern optional in the mirros.bbclass and
own-mirrors.bbclass classes.

Many URIs with the npm:// transport have no slash after the host part:

  npm://registry.npmjs.org;name=foo;version=0.1.2

This means that MIRRORS and PREMIRRORS containing entries like the
first one will not match these URIs:

  npm://.*/.*   # fails to match
  npm://.*/?.*  # matches this and URIs with path components

For normal regular expressions, a pattern like 'npm://.*(/.*)?' would
probably be preferred, but that won't work here: the pattern gets split
into the substrings 'npm', '.*(' and '/.*)?', which are not valid
regular expressions individually.

(From OE-Core rev: 0d1e2b4507af28fc451b8fa94130a39ac342637d)

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/classes/mirrors.bbclass
meta/classes/own-mirrors.bbclass