All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Ke <ke.yu@intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: poky@yoctoproject.org
Subject: Re: [PATCH 1/1] FetchData: add SRC_URI checksum
Date: Thu, 16 Dec 2010 17:16:09 +0800	[thread overview]
Message-ID: <20101216091609.GA20780@kyu3-hedt> (raw)
In-Reply-To: <1292404345.26558.1586.camel@rex>

On Dec 15, 09:12, Richard Purdie wrote:
> 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.

thanks for the review. and yes, will do that.

> 
> > +    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.

for the "make warnings optionally fatal in bitbake", do you mean add a variable like "BB_STRICT_CHECKSUM" in config file, and if for example "BB_STRICT_CHECKSUMS" = "1", then fatal, otherwise, just warning?

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

Good catch. It should only verify for "http/https/ftp/ftps" protocol, other protocol like local file and SCM url should just return.

Regards
Ke

> 
> Otherwise I'm good with the patch and if you tweak these things I'll
> merge it.
> 
> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


  reply	other threads:[~2010-12-16  9:11 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
2010-12-16  9:16     ` Yu Ke [this message]
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=20101216091609.GA20780@kyu3-hedt \
    --to=ke.yu@intel.com \
    --cc=poky@yoctoproject.org \
    --cc=richard.purdie@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.