summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2019-09-04 07:37:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-06 11:58:50 +0100
commit78ac8af7851a7772d8535b19ae7b95ff49a6aa3b (patch)
tree7e7d023032b99e882b3a1912adc3eb148e22806c /bitbake
parent6cd3eee5fa11465eccf166a0093355fe3567eb1b (diff)
downloadpoky-78ac8af7851a7772d8535b19ae7b95ff49a6aa3b.tar.gz
bitbake: fetch2: show warning when renaming the archive with bad checksum failed
* noticed on read-only sshfs premirror * it was showing the warning about renaming the file: WARNING: laser-geometry-1.6.4-r0 do_fetch: Renaming /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz to /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz_bad-checksum_1ee7479b8c5914b4ffae996945121441 and then failed because of movefile() issue with python3 (fixed in previous commit): ERROR: laser-geometry-1.6.4-r0 do_fetch: Error executing a python function in exec_python_func() autogenerated: with movefile() fixed, it let do_fetch continue and re-fetch locally with the right checksum, but still the renamed file didn't exist, because of movefile failure - add another warning when the movefile fails - for whatever reason - unfortunately movefile prints error messages with just print() so the real error is hidden only in log.do_fetch in this case: movefile: Failed to move /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz to /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz_bad-checksum_1ee7479b8c5914b4ffae996945121441 [Errno 30] Read-only file system: '/jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz' -> '/jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz_bad-checksum_1ee7479b8c5914b4ffae996945121441' (Bitbake rev: 24e44c412ac36987c1f65ced50030064ec58100d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 84327c2f8f..b00aeb3afd 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -964,7 +964,8 @@ def rename_bad_checksum(ud, suffix):
964 964
965 new_localpath = "%s_bad-checksum_%s" % (ud.localpath, suffix) 965 new_localpath = "%s_bad-checksum_%s" % (ud.localpath, suffix)
966 bb.warn("Renaming %s to %s" % (ud.localpath, new_localpath)) 966 bb.warn("Renaming %s to %s" % (ud.localpath, new_localpath))
967 bb.utils.movefile(ud.localpath, new_localpath) 967 if not bb.utils.movefile(ud.localpath, new_localpath):
968 bb.warn("Renaming %s to %s failed, grep movefile in log.do_fetch to see why" % (ud.localpath, new_localpath))
968 969
969 970
970def try_mirror_url(fetch, origud, ud, ld, check = False): 971def try_mirror_url(fetch, origud, ud, ld, check = False):