[oe-commits] Denys Dmytriyenko : base.bbclass: not use bb.fetch.urldata in do_unpack() for traversing SRC_URIs
git version control
git at git.openembedded.org
Mon Sep 27 19:34:04 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 661658f62bf4c76b328d67e1aa252a57841b312d
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=661658f62bf4c76b328d67e1aa252a57841b312d
Author: Denys Dmytriyenko <denis at denix.org>
Date: Mon Sep 27 08:21:04 2010 +0000
base.bbclass: not use bb.fetch.urldata in do_unpack() for traversing SRC_URIs
bb.fetch.urldata contains cached SRC_URIs, but in case SRC_URI is altered by
amend.inc or machine override, the original SRC_URI is not removed from the
cache, leading to calling do_unpack() multiple times on original and modified
versions of the file. Don't rely on bb.fetch.urldata and traverse SRC_URIs
directly.
Some background and details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/36703
Signed-off-by: Denys Dmytriyenko <denis at denix.org>
Acked-by: Chris Larson <chris_larson at mentor.com>
Acked-by: Khem Raj <raj.khem at gmail.com>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>
---
classes/base.bbclass | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/classes/base.bbclass b/classes/base.bbclass
index b19eb32..964fe1c 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -202,10 +202,14 @@ do_unpack[dirs] = "${WORKDIR}"
python base_do_unpack() {
from glob import glob
- srcurldata = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True)
+ src_uri = d.getVar("SRC_URI", True)
+ if not src_uri:
+ return
+ srcurldata = bb.fetch.init(src_uri.split(), d, True)
filespath = d.getVar("FILESPATH", True).split(":")
- for url, urldata in srcurldata.iteritems():
+ for url in src_uri.split():
+ urldata = srcurldata[url]
if urldata.type == "file" and "*" in urldata.path:
# The fetch code doesn't know how to handle globs, so
# we need to handle the local bits ourselves
More information about the Openembedded-commits
mailing list