All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch2: Ensure expansions happen in URL parameters in uri_replace
@ 2013-02-14 21:36 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-02-14 21:36 UTC (permalink / raw)
  To: bitbake-devel

For example, this allows us to specify downloadfilename=PATH in sstate
mirror urls to improve directory structures in DL_DIR when using sstate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 21f576e..3f5de99 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -214,6 +214,8 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d):
                         return None
             # Overwrite any specified replacement parameters
             for k in uri_replace_decoded[loc]:
+                for l in replacements:
+                    uri_replace_decoded[loc][k] = uri_replace_decoded[loc][k].replace(l, replacements[l])
                 result_decoded[loc][k] = uri_replace_decoded[loc][k]
         elif (re.match(regexp, uri_decoded[loc])):
             if not uri_replace_decoded[loc]:





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-14 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 21:36 [PATCH] fetch2: Ensure expansions happen in URL parameters in uri_replace Richard Purdie

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.