Poky Project Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Yu Ke <ke.yu@intel.com>
Cc: poky@yoctoproject.org
Subject: Re: [PATCH 1/1] FetchData: add SRC_URI checksum
Date: Wed, 15 Dec 2010 09:12:25 +0000	[thread overview]
Message-ID: <1292404345.26558.1586.camel@rex> (raw)
In-Reply-To: <b17a9056f9de3313cb6d212aa7a689883358862a.1292320885.git.ke.yu@intel.com>

Hi Ke,

This patch looks good in general, just a couple of minor things:

On Tue, 2010-12-14 at 15:55 +0800, Yu Ke wrote:
>  
> +def verify_checksum(d, ud):
> +    """
> +    verify the MD5 and SHA256 checksum for downloaded src
> +    return True if matched, False if not
> +    """

This should be more explicit about the missing checksums case.

> +    md5data = bb.utils.md5_file(ud.localpath)
> +    sha256data = bb.utils.sha256_file(ud.localpath)
> +
> +    if (ud.md5_expected == None or ud.sha256_expected == None):
> +        bb.warn("Missing SRC_URI checksum for %s, consider to add\n" \
> +                "SRC_URI[%s] = \"%s\"\nSRC_URI[%s] = \"%s\"" \
> +                % (ud.localpath, ud.md5_name, md5data, ud.sha256_name, sha256data))
> +        # TODO: change to "return False" once all recpies has checksum entry
> +        return True

We can't just redefine "policy" like this in bitbake. I think missing
checksums will always be warnings and we might just make warnings
optionally fatal for bitbake.

What does this do for file:// urls or SCM urls?

Otherwise I'm good with the patch and if you tweak these things I'll
merge it.

Cheers,

Richard




  reply	other threads:[~2010-12-15  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 10:01 [PATCH 0/1] SRC_URI checksum support v2 Yu Ke
2010-12-14  7:55 ` [PATCH 1/1] FetchData: add SRC_URI checksum Yu Ke
2010-12-15  9:12   ` Richard Purdie [this message]
2010-12-16  9:16     ` Yu Ke
2010-12-14 12:32 ` [PATCH 0/1] SRC_URI checksum support v2 Koen Kooi
  -- strict thread matches above, loose matches on Subject: below --
2010-12-17  6:33 [PATCH 0/1] SRC_URI checksum support v3 Yu Ke
2010-12-17  5:52 ` [PATCH 1/1] FetchData: add SRC_URI checksum Yu Ke

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=1292404345.26558.1586.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=ke.yu@intel.com \
    --cc=poky@yoctoproject.org \
    /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