mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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>
This commit is contained in:
@@ -476,6 +476,7 @@ def try_mirrors(d, origud, mirrors, check = False):
|
|||||||
|
|
||||||
if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
|
if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
|
||||||
ud.method.download(newuri, ud, ld)
|
ud.method.download(newuri, ud, ld)
|
||||||
|
open(ud.donestamp, 'w').close()
|
||||||
if hasattr(ud.method,"build_mirror_data"):
|
if hasattr(ud.method,"build_mirror_data"):
|
||||||
ud.method.build_mirror_data(newuri, ud, ld)
|
ud.method.build_mirror_data(newuri, ud, ld)
|
||||||
|
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ class Git(FetchMethod):
|
|||||||
os.chdir(ud.clonedir)
|
os.chdir(ud.clonedir)
|
||||||
logger.info("Creating tarball of git repository")
|
logger.info("Creating tarball of git repository")
|
||||||
runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d)
|
runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d)
|
||||||
|
runfetchcmd("touch %s.done" % (ud.fullmirror), d)
|
||||||
|
|
||||||
def unpack(self, ud, destdir, d):
|
def unpack(self, ud, destdir, d):
|
||||||
""" unpack the downloaded src to destdir"""
|
""" unpack the downloaded src to destdir"""
|
||||||
|
|||||||
Reference in New Issue
Block a user