path: root/meta/classes/mirrors.bbclass
diff options
authorOlaf Mandel <>2017-08-25 17:01:57 (GMT)
committerRichard Purdie <>2017-08-30 10:14:26 (GMT)
commit0731fd41dbbe8d2dd7118219cd12bb7a73fed4fd (patch)
tree62702be2e422863187cf5dabe8e050b051864f04 /meta/classes/mirrors.bbclass
parenta3211222b28cad850db6b763d9c20ff55afecdb0 (diff)
(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://;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 <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'meta/classes/mirrors.bbclass')
1 files changed, 2 insertions, 2 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://.*/.* \n \
48osc://.*/.* \n \ 48osc://.*/.* \n \
49https?$://.*/.* \n \ 49https?$://.*/.* \n \
50ftp://.*/.* \n \ 50ftp://.*/.* \n \
51npm://.*/.* \n \ 51npm://.*/?.* \n \
52cvs://.*/.* \n \ 52cvs://.*/.* \n \
53svn://.*/.* \n \ 53svn://.*/.* \n \
54git://.*/.* \n \ 54git://.*/.* \n \
@@ -58,7 +58,7 @@ p4://.*/.* \n \
58osc://.*/.* \n \ 58osc://.*/.* \n \
59https?$://.*/.* \n \ 59https?$://.*/.* \n \
60ftp://.*/.* \n \ 60ftp://.*/.* \n \
61npm://.*/.* \n \ 61npm://.*/?.* \n \
62${CPAN_MIRROR} \n \ 62${CPAN_MIRROR} \n \
63${CPAN_MIRROR} \n \ 63${CPAN_MIRROR} \n \
64" 64"