All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch2: make sure the uri added as expected
@ 2021-05-14  6:04 Yu, Mingli
  2021-05-14  6:16 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Yu, Mingli @ 2021-05-14  6:04 UTC (permalink / raw)
  To: bitbake-devel

From: Mingli Yu <mingli.yu@windriver.com>

Make sure the uri added as expected in some scenarioes such as
with below setting:

PREMIRRORS_append = ".*://.*/.* git:///net/SharedImage/downloads/git2/MIRRORNAME;protocol=file"

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 lib/bb/fetch2/__init__.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index cf0201c4..6701654b 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -430,6 +430,8 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
     uri_replace_decoded = list(decodeurl(uri_replace))
     logger.debug2("For url %s comparing %s to %s" % (uri_decoded, uri_find_decoded, uri_replace_decoded))
     result_decoded = ['', '', '', '', '', {}]
+    if uri_find_decoded[0] == '.*' and uri_replace_decoded[0] != 'file':
+        uri_find_decoded[0] = uri_replace_decoded[0]
     for loc, i in enumerate(uri_find_decoded):
         result_decoded[loc] = uri_decoded[loc]
         regexp = i
-- 
2.17.1


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

end of thread, other threads:[~2021-05-19  8:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  6:04 [PATCH] fetch2: make sure the uri added as expected Yu, Mingli
2021-05-14  6:16 ` [bitbake-devel] " Richard Purdie
2021-05-14  7:36   ` Yu, Mingli
2021-05-18 10:15     ` Richard Purdie
     [not found]   ` <167EDE5E75B22E11.24280@lists.openembedded.org>
2021-05-18  9:25     ` Yu, Mingli
2021-05-19  2:05     ` Yu, Mingli
2021-05-19  8:03       ` Richard Purdie
2021-05-19  8:52         ` Yu, Mingli

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.