summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlaf Mandel <o.mandel@menlosystems.com>2017-08-25 17:01:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-30 11:14:26 +0100
commit0731fd41dbbe8d2dd7118219cd12bb7a73fed4fd (patch)
tree62702be2e422863187cf5dabe8e050b051864f04
parenta3211222b28cad850db6b763d9c20ff55afecdb0 (diff)
downloadpoky-0731fd41dbbe8d2dd7118219cd12bb7a73fed4fd.tar.gz
(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>
-rw-r--r--meta/classes/mirrors.bbclass4
-rw-r--r--meta/classes/own-mirrors.bbclass2
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
index b98684f5c6..766f1cb6fa 100644
--- a/meta/classes/mirrors.bbclass
+++ b/meta/classes/mirrors.bbclass
@@ -48,7 +48,7 @@ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
48osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ 48osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
49https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ 49https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
50ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ 50ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
51npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ 51npm://.*/?.* http://downloads.yoctoproject.org/mirror/sources/ \n \
52cvs://.*/.* http://sources.openembedded.org/ \n \ 52cvs://.*/.* http://sources.openembedded.org/ \n \
53svn://.*/.* http://sources.openembedded.org/ \n \ 53svn://.*/.* http://sources.openembedded.org/ \n \
54git://.*/.* http://sources.openembedded.org/ \n \ 54git://.*/.* http://sources.openembedded.org/ \n \
@@ -58,7 +58,7 @@ p4://.*/.* http://sources.openembedded.org/ \n \
58osc://.*/.* http://sources.openembedded.org/ \n \ 58osc://.*/.* http://sources.openembedded.org/ \n \
59https?$://.*/.* http://sources.openembedded.org/ \n \ 59https?$://.*/.* http://sources.openembedded.org/ \n \
60ftp://.*/.* http://sources.openembedded.org/ \n \ 60ftp://.*/.* http://sources.openembedded.org/ \n \
61npm://.*/.* http://sources.openembedded.org/ \n \ 61npm://.*/?.* http://sources.openembedded.org/ \n \
62${CPAN_MIRROR} http://cpan.metacpan.org/ \n \ 62${CPAN_MIRROR} http://cpan.metacpan.org/ \n \
63${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \ 63${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \
64" 64"
diff --git a/meta/classes/own-mirrors.bbclass b/meta/classes/own-mirrors.bbclass
index 12b42675bc..0296d545be 100644
--- a/meta/classes/own-mirrors.bbclass
+++ b/meta/classes/own-mirrors.bbclass
@@ -9,5 +9,5 @@ p4://.*/.* ${SOURCE_MIRROR_URL}
9osc://.*/.* ${SOURCE_MIRROR_URL} 9osc://.*/.* ${SOURCE_MIRROR_URL}
10https?$://.*/.* ${SOURCE_MIRROR_URL} 10https?$://.*/.* ${SOURCE_MIRROR_URL}
11ftp://.*/.* ${SOURCE_MIRROR_URL} 11ftp://.*/.* ${SOURCE_MIRROR_URL}
12npm://.*/.* ${SOURCE_MIRROR_URL} 12npm://.*/?.* ${SOURCE_MIRROR_URL}
13} 13}