From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mail.openembedded.org (Postfix) with ESMTP id D850E7F29F for ; Wed, 4 Sep 2019 07:37:27 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id 30so9094684wrk.11 for ; Wed, 04 Sep 2019 00:37:29 -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=aFQjJrPuznJWTgfnDkOx9+f5+vtktMp82uhAJnuKpSA=; b=l0Mjal9wZkL7iv8w4B0TOh5DjB1cWELzJwE1vGkdEIbDpAkbxwo08727Z/NDkAysnp 9hYUvk9+cxGja7g8g2Ck2sVDKBfN7c39qGaMg+yrwaSjlkXzHN5sKQlmMsQ8aFkKDK7X ntjmk1d2CeEE9rkDY1/iF12EcdINyCkg35mFcwMxxxvnFz5pwljbQPoKOND1uuUMu24t NkSwgl/LNTP8obpR1WMyw669cCuUVS+pSWZboB6/4GoozJAXgehBKdsB80zqdVK/LN3w zNCsPsIzPUWTYA+AMPvY6y39m51EakwF9qvNrtCPssGgo0ZTv6LwLSuUeSiXij4XwXd9 mDRQ== 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=aFQjJrPuznJWTgfnDkOx9+f5+vtktMp82uhAJnuKpSA=; b=pttQFd/2Z2Ybu4uMbYkMBmZfnUfLbF174aKttU7H/FQfnhdi7AgkxCFt3WR3keJ7Qo SaUNKtx32C/1SIFzUQeNQ8WbeE7Uzw+9WuiPbP+Xz2jeGLS1Yyw8YQxcoAPUbiCOiYJ7 CPRlacxMblvGb34NAdgqp1/S/SocTXRqzwNHN1/Iu442aENsKYIySsLrwfxUW8KJ/nW2 6SI1mDyir8Ds49e38tzdU0n2IIovGgMEzfOWKy91baEyjVwZ2nxTuUGfq84uodeJlFTq 8cRyW5B/e33cQk4DMZrfKRlcOb/Mrw9bdIWGIw9aMdK+znY3Re9/gD1gtaNDMUPWZ/T9 UmbQ== X-Gm-Message-State: APjAAAX2KP5PN5iSaiPqorbZXF13ti2y89REJgXwGlasmPMEjN2OC2BX 6u36+Sv2m5Fnzl7oZPna97ESddGkqnw= X-Google-Smtp-Source: APXvYqwXIKMulz4/+uR0yOnsAqSNCk8AMTosoWJ3hiHMYhsd8r9Ss020qPmHr/Y0y7DcC2QQL6AZ0Q== X-Received: by 2002:a5d:66d2:: with SMTP id k18mr391799wrw.7.1567582648387; Wed, 04 Sep 2019 00:37:28 -0700 (PDT) Received: from localhost (ip-217-030-068-212.aim-net.cz. [217.30.68.212]) by smtp.gmail.com with ESMTPSA id d28sm20678173wrb.95.2019.09.04.00.37.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Sep 2019 00:37:27 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa To: bitbake-devel@lists.openembedded.org Date: Wed, 4 Sep 2019 07:37:28 +0000 Message-Id: <20190904073728.2567560-2-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190904073728.2567560-1-Martin.Jansa@gmail.com> References: <20190904073728.2567560-1-Martin.Jansa@gmail.com> Subject: [1.42][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: Wed, 04 Sep 2019 07:37:28 -0000 From: Martin Jansa * 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 Signed-off-by: Richard Purdie --- 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 56129eee..e73f7d47 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -964,7 +964,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