All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch/local: Allow preservation of path components in relative file:// urls
@ 2012-07-25 21:12 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-07-25 21:12 UTC (permalink / raw)
  To: bitbake-devel

This enhances the fetcher to allow preservation of the path component in urls
like: file://xxx/yyy/somefile.patch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 1f4ec37..bfef079 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -60,9 +60,10 @@ class Local(FetchMethod):
                 filesdir = data.getVar('FILESDIR', d, True)
                 if filesdir:
                     newpath = os.path.join(filesdir, path)
-        if not os.path.exists(newpath) and path.find("*") == -1:
-            dldirfile = os.path.join(data.getVar("DL_DIR", d, True), os.path.basename(path))
-            return dldirfile
+            if not os.path.exists(newpath) and path.find("*") == -1:
+                dldirfile = os.path.join(d.getVar("DL_DIR", True), path)
+                bb.utils.mkdirhier(os.path.dirname(dldirfile))
+                return dldirfile
         return newpath
 
     def need_update(self, url, ud, d):





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

only message in thread, other threads:[~2012-07-25 21:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 21:12 [PATCH] fetch/local: Allow preservation of path components in relative file:// urls 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.