From: akuster <akuster@mvista.com>
To: Frederic Martinsons <frederic.martinsons@gmail.com>,
bitbake-devel@lists.openembedded.org
Cc: martin.jansa@gmail.com
Subject: Re: [bitbake-devel] [PATCH] fetch2: Display all missing checksum at once
Date: Tue, 4 Apr 2023 12:49:59 -0400 [thread overview]
Message-ID: <7d59e968-1dea-acf1-6d18-59bb4fd35cb6@mvista.com> (raw)
In-Reply-To: <20230401152101.19037-1-frederic.martinsons@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5024 bytes --]
On 4/1/23 11:21 AM, Frederic Martinsons wrote:
> From: Frederic Martinsons <frederic.martinsons@gmail.com>
>
> Instead of only display the first and stop.
> For recipe (crago based) that can contains several artifacts
> to fetch with their checksum, it will particularly handy
> to display all of missing one.
>
> An example of error message would be
I am confused. Is this patch supposed to add the pkg version or not? I
am not seeing any. Any ideas?
I will be holding off branching meta-security until my 4 rust recipes
can build again.
-armin
>
> NOTE: Executing Tasks
> ERROR: zvariant-3.12.0-r0 do_fetch: Missing SRC_URI checksum, please add those to the recipe:
> SRC_URI[anyhow-1.0.70.sha256sum] = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
> SRC_URI[chrono-0.4.24.sha256sum] = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
> SRC_URI[serde-1.0.158.sha256sum] = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9"
> SRC_URI[system-deps-1.3.2.sha256sum] = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b"
> ERROR: zvariant-3.12.0-r0 do_fetch: Bitbake Fetcher Error: BBFetchException('There was some missing checksums in the recipe')
> ERROR: Logfile of failure stored in: /home/jenkins/yocto-poky-master/poky/build/tmp/work/core2-64-poky-linux/zvariant/3.12.0-r0/temp/log.do_fetch.1025
> ERROR: Task (/home/jenkins/yocto-poky-master/poky/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb:do_fetch) failed with exit code '1'
>
> Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
> ---
> lib/bb/fetch2/__init__.py | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> index 31729885..1a86d8fd 100644
> --- a/lib/bb/fetch2/__init__.py
> +++ b/lib/bb/fetch2/__init__.py
> @@ -560,7 +560,6 @@ def verify_checksum(ud, d, precomputed={}, localpath=None, fatal_nochecksum=True
> file against those in the recipe each time, rather than only after
> downloading. See https://bugzilla.yoctoproject.org/show_bug.cgi?id=5571.
> """
> -
> if ud.ignore_checksums or not ud.method.supports_checksum(ud):
> return {}
>
> @@ -605,11 +604,7 @@ def verify_checksum(ud, d, precomputed={}, localpath=None, fatal_nochecksum=True
>
> # If strict checking enabled and neither sum defined, raise error
> if strict == "1":
> - messages.append("No checksum specified for '%s', please add at " \
> - "least one to the recipe:" % ud.localpath)
> - messages.extend(checksum_lines)
> - logger.error("\n".join(messages))
> - raise NoChecksumError("Missing SRC_URI checksum", ud.url)
> + raise NoChecksumError("\n".join(checksum_lines))
>
> bb.event.fire(MissingChecksumEvent(ud.url, **checksum_event), d)
>
> @@ -1728,6 +1723,7 @@ class Fetch(object):
> network = self.d.getVar("BB_NO_NETWORK")
> premirroronly = bb.utils.to_boolean(self.d.getVar("BB_FETCH_PREMIRRORONLY"))
>
> + checksum_missing_messages = []
> for u in urls:
> ud = self.ud[u]
> ud.setup_localpath(self.d)
> @@ -1739,7 +1735,6 @@ class Fetch(object):
>
> try:
> self.d.setVar("BB_NO_NETWORK", network)
> -
> if m.verify_donestamp(ud, self.d) and not m.need_update(ud, self.d):
> done = True
> elif m.try_premirror(ud, self.d):
> @@ -1811,13 +1806,20 @@ class Fetch(object):
> raise ChecksumError("Stale Error Detected")
>
> except BBFetchException as e:
> - if isinstance(e, ChecksumError):
> + if isinstance(e, NoChecksumError):
> + (message, _) = e.args
> + checksum_missing_messages.append(message)
> + continue
> + elif isinstance(e, ChecksumError):
> logger.error("Checksum failure fetching %s" % u)
> raise
>
> finally:
> if ud.lockfile:
> bb.utils.unlockfile(lf)
> + if checksum_missing_messages:
> + logger.error("Missing SRC_URI checksum, please add those to the recipe: \n%s", "\n".join(checksum_missing_messages))
> + raise BBFetchException("There was some missing checksums in the recipe")
>
> def checkstatus(self, urls=None):
> """
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#14629): https://lists.openembedded.org/g/bitbake-devel/message/14629
> Mute This Topic: https://lists.openembedded.org/mt/97996454/1024635
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [akuster@mvista.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4581 bytes --]
next prev parent reply other threads:[~2023-04-04 16:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-01 15:21 [PATCH] fetch2: Display all missing checksum at once frederic.martinsons
2023-04-04 16:49 ` akuster [this message]
2023-04-04 17:07 ` [bitbake-devel] " Frédéric Martinsons
2023-04-04 20:43 ` akuster
2023-04-04 17:07 ` Martin Jansa
2023-04-04 21:08 ` akuster
2023-04-04 21:35 ` Martin Jansa
2023-04-05 5:20 ` Frédéric Martinsons
2023-04-05 9:39 ` Enrico Scholz
2023-04-05 9:51 ` Frédéric Martinsons
2023-04-05 10:14 ` Enrico Scholz
2023-04-05 10:49 ` Frédéric Martinsons
2023-04-05 11:38 ` akuster
2023-04-05 12:25 ` akuster
2023-04-05 12:51 ` Frédéric Martinsons
2023-04-05 16:26 ` akuster808
2023-04-05 16:32 ` Frédéric Martinsons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d59e968-1dea-acf1-6d18-59bb4fd35cb6@mvista.com \
--to=akuster@mvista.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=frederic.martinsons@gmail.com \
--cc=martin.jansa@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).