[bitbake-devel] [OE-core] [PATCH] bitbake: fetch: Extend subdir unpack parameter to local folder
Ming Liu
liu.ming50 at gmail.com
Mon Sep 28 13:11:42 UTC 2015
From: Peter Liu <peter.x.liu at 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 at 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
More information about the bitbake-devel
mailing list