All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core] [PATCH] bitbake: fetch: Extend subdir unpack parameter to local folder
@ 2015-09-28 13:11 Ming Liu
  2015-10-03 18:35 ` Christopher Larson
  0 siblings, 1 reply; 4+ messages in thread
From: Ming Liu @ 2015-09-28 13:11 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Peter Liu

From: Peter Liu <peter.x.liu@external.atlascopco.com>

This fixes urls of the form file://some/path/file;subdir=b. When
the file is a folder.

Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.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 288a1c8..3a425aa 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1423,6 +1423,8 @@ class FetchMethod(object):
                     if basepath and basepath.find("/") != -1:
                         destdir = basepath[:basepath.rfind('/')]
                         destdir = destdir.strip('/')
+                    if urldata.parm.get('subdir') != None:
+                        destdir = urldata.parm.get('subdir') + "/" + destdir
                     if destdir != "." and not os.access("%s/%s" % (rootdir, destdir), os.F_OK):
                         os.makedirs("%s/%s" % (rootdir, destdir))
                     cmd = 'cp -fpPR %s %s/%s/' % (file, rootdir, destdir)
-- 
1.9.1



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

end of thread, other threads:[~2015-11-13 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 13:11 [OE-core] [PATCH] bitbake: fetch: Extend subdir unpack parameter to local folder Ming Liu
2015-10-03 18:35 ` Christopher Larson
2015-10-05  8:07   ` Richard Purdie
2015-11-13 18:24     ` Ming Liu

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.