summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-18 22:38:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-25 12:25:47 +0000
commit8615b0e282baadf1ac342ec38b7c79e0ac351613 (patch)
treed1633ddb039bfe357e687d6f4448224f943a2957 /meta/classes
parentf12e71484593039cd58b6e7fadd038b28b05d849 (diff)
downloadopenembedded-core-8615b0e282baadf1ac342ec38b7c79e0ac351613.tar.gz
openembedded-core-8615b0e282baadf1ac342ec38b7c79e0ac351613.tar.bz2
openembedded-core-8615b0e282baadf1ac342ec38b7c79e0ac351613.tar.xz
openembedded-core-8615b0e282baadf1ac342ec38b7c79e0ac351613.zip
base.bbclass: use bb.fetch2 unpack API
Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 583f9b775..ec55d4aa7 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -256,7 +256,13 @@ python base_do_unpack() {
continue
local = os.path.realpath(local)
lf = bb.utils.lockfile(urldata[url].lockfile)
- ret = oe_unpack_file(local, localdata, url)
+ if bb.fetch.__version__ == "1":
+ ret = oe_unpack_file(local, localdata, url)
+ else:
+ # use bb.fetch2 unpack API
+ ud = urldata[url]
+ rootdir = bb.data.getVar('WORKDIR', localdata, True)
+ ret = ud.method.unpack(ud, rootdir, localdata)
bb.utils.unlockfile(lf)
if not ret:
raise bb.build.FuncFailed("oe_unpack_file failed with return value %s" % ret)