[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7445/8267] (PRE)MIRRORS: fix pattern for npm:// without slash
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7445/8267] (PRE)MIRRORS: fix pattern for npm:// without slash
- Date: Sun, 17 Dec 2017 06:15:30 +0000 (UTC)
commit 0731fd41dbbe8d2dd7118219cd12bb7a73fed4fd
Author: Olaf Mandel <o mandel menlosystems com>
Date: Fri Aug 25 17:01:57 2017 +0000
(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>
meta/classes/mirrors.bbclass | 4 ++--
meta/classes/own-mirrors.bbclass | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
index b98684f..766f1cb 100644
--- a/meta/classes/mirrors.bbclass
+++ b/meta/classes/mirrors.bbclass
@@ -48,7 +48,7 @@ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
-npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+npm://.*/?.* http://downloads.yoctoproject.org/mirror/sources/ \n \
cvs://.*/.* http://sources.openembedded.org/ \n \
svn://.*/.* http://sources.openembedded.org/ \n \
git://.*/.* http://sources.openembedded.org/ \n \
@@ -58,7 +58,7 @@ p4://.*/.* http://sources.openembedded.org/ \n \
osc://.*/.* http://sources.openembedded.org/ \n \
https?$://.*/.* http://sources.openembedded.org/ \n \
ftp://.*/.* http://sources.openembedded.org/ \n \
-npm://.*/.* http://sources.openembedded.org/ \n \
+npm://.*/?.* http://sources.openembedded.org/ \n \
${CPAN_MIRROR} http://cpan.metacpan.org/ \n \
${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \
"
diff --git a/meta/classes/own-mirrors.bbclass b/meta/classes/own-mirrors.bbclass
index 12b4267..0296d54 100644
--- a/meta/classes/own-mirrors.bbclass
+++ b/meta/classes/own-mirrors.bbclass
@@ -9,5 +9,5 @@ p4://.*/.* ${SOURCE_MIRROR_URL}
osc://.*/.* ${SOURCE_MIRROR_URL}
https?$://.*/.* ${SOURCE_MIRROR_URL}
ftp://.*/.* ${SOURCE_MIRROR_URL}
-npm://.*/.* ${SOURCE_MIRROR_URL}
+npm://.*/?.* ${SOURCE_MIRROR_URL}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]