[bitbake-devel] [PATCH 3/3] bb.fetch: don't remove the clone when an update fails
Christopher Larson
kergoth at gmail.com
Wed Aug 26 16:37:47 UTC 2015
From: Christopher Larson <chris_larson at mentor.com>
When our clone exists, but is out of date, and the attempt to update it fails,
we don't necessarily want to remove the entire clone, particularly if it's
a large repository.
Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
lib/bb/fetch2/__init__.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index e229c30..3d53b63 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1590,7 +1590,8 @@ class Fetch(object):
os.chdir(self.d.getVar("DL_DIR", True))
firsterr = None
- if not localpath and ((not verify_donestamp(ud, self.d)) or m.need_update(ud, self.d)):
+ verified_stamp = verify_donestamp(ud, self.d)
+ if not localpath and (not verified_stamp or m.need_update(ud, self.d)):
try:
if not trusted_network(self.d, ud.url):
raise UntrustedUrl(ud.url)
@@ -1618,7 +1619,8 @@ class Fetch(object):
logger.debug(1, str(e))
firsterr = e
# Remove any incomplete fetch
- m.clean(ud, self.d)
+ if not verified_stamp:
+ m.clean(ud, self.d)
logger.debug(1, "Trying MIRRORS")
mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
localpath = try_mirrors(self, self.d, ud, mirrors)
--
2.2.1
More information about the bitbake-devel
mailing list