[oe-commits] [bitbake] 02/02: fetch2: show warning when renaming the archive with bad checksum failed

git at git.openembedded.org git at git.openembedded.org
Fri Sep 6 10:59:24 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch 1.40
in repository bitbake.

commit d36438759344caa447d9a0bf30749a0aa31d1fba
Author: Martin Jansa <martin.jansa at gmail.com>
AuthorDate: Wed Sep 4 07:37:00 2019 +0000

    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'
    
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 709372e..708b83d 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -966,7 +966,8 @@ def rename_bad_checksum(ud, suffix):
 
     new_localpath = "%s_bad-checksum_%s" % (ud.localpath, suffix)
     bb.warn("Renaming %s to %s" % (ud.localpath, new_localpath))
-    bb.utils.movefile(ud.localpath, new_localpath)
+    if not bb.utils.movefile(ud.localpath, new_localpath):
+        bb.warn("Renaming %s to %s failed, grep movefile in log.do_fetch to see why" % (ud.localpath, new_localpath))
 
 
 def try_mirror_url(fetch, origud, ud, ld, check = False):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list