Return-Path: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mail.openembedded.org (Postfix) with ESMTP id 548F5606D0 for ; Tue, 3 Sep 2019 07:49:59 +0000 (UTC) Received: by mail-wm1-f50.google.com with SMTP id g207so12945745wmg.5 for ; Tue, 03 Sep 2019 00:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=L/PnP4psSuDo9vL44M2qYj279QjDL+mxpT1buW+HVmw=; b=CCvyCdY8/rq9MsuBZ1m0iiQ3DM8415G+3/Kn1Qra1M04s2jHJOLm09MlL3/hexTXkp EOgJAIntdculW/qTozeqViUOWl+AEHQeHcWKDu0hR7IvySqzZsrndpp+XgabmAgvToN2 DqOMKIfV/vGzcaGduGtNIocVOSsKq0g51QyMpq77kI24CkdqioMe6SBkrmgPAVJSpSyJ Dq9J31VO+a1prOcqoBSuMktuXutchLx+ge9q5m2psLPjIKvG4wGi/qZ0+XQSkj2npy23 pUtajen3d2Oe90pHpKih4zQIDD4JhqhbQ6btLslV6J47R4maEOWfEgapWNesTRbPOgpN LyWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=L/PnP4psSuDo9vL44M2qYj279QjDL+mxpT1buW+HVmw=; b=cxa0P40xID3E2W4sZCnJPkbk7oUbLhE+G4msLBFYl/KW64s+jddjwkOv++egp4QUzc vciliqqCGvNMqCR9dq/G2hBn1whEtQ0BOPm1vh6soU5bzIgeHzDRdRur2kl5/R9iyrpb YfaH5bPqrDAeIM8f5FJUC8s2tHHrPXQZhH8/Q61eykxvOEcGY20zt+MPNO90wnmMQF4Z O5wuXDTYTZwzuJtA3EIFmwJePJNszSP5W33u/aBWbQ8GBPxr9ptDrptmqMMN5Gwzj/v+ jFWSfhrJ59gM8aGzkpn2FI85wxd2+jm5dN6B32xhCnLUzWXEWNw223nywHuL4I59KZZS UsSw== X-Gm-Message-State: APjAAAWM0BzYrKgR/3OEATSU39zsrW8gVTxCX7ZK2CaChwuerh4StesX kHkNj+zX6h4AM0n9AmCFLiHecmtfUAQ= X-Google-Smtp-Source: APXvYqyiPv4kOkY/DVvjS3gv4KrRX2DlOAyzToMd1G59lvBiXA0sEJoRFMYpRmbHs+peBkIhUOZ1LA== X-Received: by 2002:a1c:cb83:: with SMTP id b125mr34395459wmg.43.1567496999640; Tue, 03 Sep 2019 00:49:59 -0700 (PDT) Received: from localhost (ip-217-030-068-212.aim-net.cz. [217.30.68.212]) by smtp.gmail.com with ESMTPSA id w5sm13870239wmm.43.2019.09.03.00.49.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Sep 2019 00:49:59 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa To: bitbake-devel@lists.openembedded.org Date: Tue, 3 Sep 2019 07:49:57 +0000 Message-Id: <20190903074957.1679-2-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903074957.1679-1-Martin.Jansa@gmail.com> References: <20190903074957.1679-1-Martin.Jansa@gmail.com> Subject: [PATCH 2/2] fetch2: show warning when renaming the archive with bad checksum failed X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2019 07:49:59 -0000 * 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 --- 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 79f52496..299d4b0d 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -962,7 +962,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): -- 2.17.1