aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-08-26 09:37:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-04 16:24:00 +0100
commita0246316c6b67d49ff7fcb614e9d308b870c85d5 (patch)
treed30ece69e8ac0f98829bb2679965350484927d76 /bitbake/lib/bb/fetch2
parentba50c2f4b9619d355abddc19624b7a7798c71c6f (diff)
downloadopenembedded-core-contrib-a0246316c6b67d49ff7fcb614e9d308b870c85d5.tar.gz
bitbake: bb.fetch: don't remove the clone when an update fails
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. (Bitbake rev: 19af272ba5256653edeff6acbceeb09e3e478d61) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index e229c30f61..3d53b63b3e 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/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)