From: Christopher Larson Date: Thu, 10 Dec 2015 18:57:23 +0000 (+0500) Subject: fetch: use orig localpath when calling orig method X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1732ad65d6c7d67b7d07cb30c074f5016adadbea;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git fetch: use orig localpath when calling orig method When a mirror tarball is fetched, the original fetch method is called, which unpacks the mirror tarball. After the original method is called, it checks the localpath of the mirror tarball rather than the clone path, which isn't ideal, particularly if the mirror tarball was removed due to being out of date. We know the original fetch method will do what it needs to do to get its content in the form it needs from the mirror tarball, so we can use its localpath instead. Signed-off-by: Christopher Larson Signed-off-by: Awais Belal Signed-off-by: Richard Purdie --- diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index d66a212cb3b..68ebf8b8d20 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -955,7 +955,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): origud.method.download(origud, ld) if hasattr(origud.method,"build_mirror_data"): origud.method.build_mirror_data(origud, ld) - return ud.localpath + return origud.localpath # Otherwise the result is a local file:// and we symlink to it if not os.path.exists(origud.localpath): if os.path.islink(origud.localpath):