diff options
author | Olaf Mandel <o.mandel@menlosystems.com> | 2017-08-25 17:01:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-21 16:55:57 +0100 |
commit | 873a4eca112c5e7a6e68d9a8ea4d88bba7fc3c7d (patch) | |
tree | 9001d5455cdbd9603a9f0a17217de9249fb0d686 /meta/classes | |
parent | 23ea6ac574e4653a20c808eb557fc5e64d3fc58d (diff) | |
download | poky-873a4eca112c5e7a6e68d9a8ea4d88bba7fc3c7d.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)
(From OE-Core rev: 1f5675a43e1781635fee15cc3674143c195da169)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/mirrors.bbclass | 4 | ||||
-rw-r--r-- | 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 d5812d8b3f..4ad814ff2f 100644 --- a/meta/classes/mirrors.bbclass +++ b/meta/classes/mirrors.bbclass | |||
@@ -54,7 +54,7 @@ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ | |||
54 | osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ | 54 | osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ |
55 | https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ | 55 | https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ |
56 | ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ | 56 | ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ |
57 | npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ | 57 | npm://.*/?.* http://downloads.yoctoproject.org/mirror/sources/ \n \ |
58 | cvs://.*/.* http://sources.openembedded.org/ \n \ | 58 | cvs://.*/.* http://sources.openembedded.org/ \n \ |
59 | svn://.*/.* http://sources.openembedded.org/ \n \ | 59 | svn://.*/.* http://sources.openembedded.org/ \n \ |
60 | git://.*/.* http://sources.openembedded.org/ \n \ | 60 | git://.*/.* http://sources.openembedded.org/ \n \ |
@@ -64,7 +64,7 @@ p4://.*/.* http://sources.openembedded.org/ \n \ | |||
64 | osc://.*/.* http://sources.openembedded.org/ \n \ | 64 | osc://.*/.* http://sources.openembedded.org/ \n \ |
65 | https?$://.*/.* http://sources.openembedded.org/ \n \ | 65 | https?$://.*/.* http://sources.openembedded.org/ \n \ |
66 | ftp://.*/.* http://sources.openembedded.org/ \n \ | 66 | ftp://.*/.* http://sources.openembedded.org/ \n \ |
67 | npm://.*/.* http://sources.openembedded.org/ \n \ | 67 | npm://.*/?.* http://sources.openembedded.org/ \n \ |
68 | ${CPAN_MIRROR} http://cpan.metacpan.org/ \n \ | 68 | ${CPAN_MIRROR} http://cpan.metacpan.org/ \n \ |
69 | ${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \ | 69 | ${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \ |
70 | " | 70 | " |
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} | |||
9 | osc://.*/.* ${SOURCE_MIRROR_URL} | 9 | osc://.*/.* ${SOURCE_MIRROR_URL} |
10 | https?$://.*/.* ${SOURCE_MIRROR_URL} | 10 | https?$://.*/.* ${SOURCE_MIRROR_URL} |
11 | ftp://.*/.* ${SOURCE_MIRROR_URL} | 11 | ftp://.*/.* ${SOURCE_MIRROR_URL} |
12 | npm://.*/.* ${SOURCE_MIRROR_URL} | 12 | npm://.*/?.* ${SOURCE_MIRROR_URL} |
13 | } | 13 | } |