summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 14:52:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 14:54:16 +0000
commit3d69d9462d550ce4e00e14768cc616bc9ad7e8a5 (patch)
treef875ea478604e4bda122330ca3372b2923599ccd /bitbake/lib
parent67c83a8c0838c28cfbbb792daa83aa1f3c331302 (diff)
downloadpoky-3d69d9462d550ce4e00e14768cc616bc9ad7e8a5.tar.gz
bitbake/fetch2: Ensure mirror tarballs have .done stamps so we don't redownload and corrupt them
[YOCTO #2154] (Bitbake rev: 521d6b14151d3bf934b9597557f7ae46e50a3d7a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py1
-rw-r--r--bitbake/lib/bb/fetch2/git.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 7524fa95a8..e5c4b341b0 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -476,6 +476,7 @@ def try_mirrors(d, origud, mirrors, check = False):
476 476
477 if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld): 477 if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
478 ud.method.download(newuri, ud, ld) 478 ud.method.download(newuri, ud, ld)
479 open(ud.donestamp, 'w').close()
479 if hasattr(ud.method,"build_mirror_data"): 480 if hasattr(ud.method,"build_mirror_data"):
480 ud.method.build_mirror_data(newuri, ud, ld) 481 ud.method.build_mirror_data(newuri, ud, ld)
481 482
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 4e46ec8f30..61fdc4b05e 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -214,6 +214,7 @@ class Git(FetchMethod):
214 os.chdir(ud.clonedir) 214 os.chdir(ud.clonedir)
215 logger.info("Creating tarball of git repository") 215 logger.info("Creating tarball of git repository")
216 runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d) 216 runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d)
217 runfetchcmd("touch %s.done" % (ud.fullmirror), d)
217 218
218 def unpack(self, ud, destdir, d): 219 def unpack(self, ud, destdir, d):
219 """ unpack the downloaded src to destdir""" 220 """ unpack the downloaded src to destdir"""