[bitbake-devel] [PATCH] bitbake: fetch: use orig localpath when calling orig method

Belal, Awais Awais_Belal at mentor.com
Fri Dec 11 10:56:57 UTC 2015


This applies to 1.28 as well and otherwise broken builds are seen where the git tarball from source mirror is outdated.

BR,
Awais

________________________________________
From: bitbake-devel-bounces at lists.openembedded.org [bitbake-devel-bounces at lists.openembedded.org] on behalf of Belal, Awais
Sent: Thursday, December 10, 2015 11:57 PM
To: bitbake-devel at lists.openembedded.org
Subject: [bitbake-devel] [PATCH] bitbake: fetch: use orig localpath when        calling orig method

From: Christopher Larson <chris_larson at mentor.com>

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 <chris_larson at mentor.com>
Signed-off-by: Awais Belal <awais_belal at mentor.com>
---
 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index d66a212..68ebf8b 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):
--
1.9.1

--
_______________________________________________
bitbake-devel mailing list
bitbake-devel at lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/bitbake-devel



More information about the bitbake-devel mailing list