All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] (PRE)MIRRORS: add pattern for npm:// without slash
@ 2017-08-24 18:19 Olaf Mandel
  2017-08-24 20:53 ` Paul Eggleton
  0 siblings, 1 reply; 8+ messages in thread
From: Olaf Mandel @ 2017-08-24 18:19 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

For URLs with the npm:// transport but with no other slash in it, the
common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match.
Add a new pattern in the mirros.bbclass and own-mirrors.bbclass classes
for these URLs.

Many URLs 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 URLs:

  npm://.*/.*   # fails to match
  npm://.*      # matches, but not those URLs with a slash

Because the npm:// URLs without a slash seem to be more ubiquitous (they
are generated by recipetool), place the new pattern first.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
---
 meta/classes/mirrors.bbclass     | 2 ++
 meta/classes/own-mirrors.bbclass | 1 +
 2 files changed, 3 insertions(+)

diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
index b98684f5c6..710df3c7bf 100644
--- a/meta/classes/mirrors.bbclass
+++ b/meta/classes/mirrors.bbclass
@@ -48,6 +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 \
@@ -58,6 +59,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 12b42675bc..253ed9cb7e 100644
--- a/meta/classes/own-mirrors.bbclass
+++ b/meta/classes/own-mirrors.bbclass
@@ -9,5 +9,6 @@ p4://.*/.*      ${SOURCE_MIRROR_URL}
 osc://.*/.*     ${SOURCE_MIRROR_URL}
 https?$://.*/.* ${SOURCE_MIRROR_URL}
 ftp://.*/.*     ${SOURCE_MIRROR_URL}
+npm://.*        ${SOURCE_MIRROR_URL}
 npm://.*/.*     ${SOURCE_MIRROR_URL}
 }
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-25 17:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 18:19 [PATCH] (PRE)MIRRORS: add pattern for npm:// without slash Olaf Mandel
2017-08-24 20:53 ` Paul Eggleton
2017-08-25  9:38   ` Olaf Mandel
2017-08-25  9:58     ` [PATCH v2] " Olaf Mandel
2017-08-25 14:32       ` Leonardo Sandoval
2017-08-25 16:14         ` Olaf Mandel
2017-08-25 17:00           ` Olaf Mandel
2017-08-25 17:01             ` [PATCH v3] (PRE)MIRRORS: fix " Olaf Mandel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.