From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: OEDEM 2009 summary: Death to checksums.ini?
Date: Thu, 12 Nov 2009 20:18:09 +0100 [thread overview]
Message-ID: <20091112191809.GG9787@mx.loc> (raw)
In-Reply-To: <1258050962.25369.454.camel@lenovo.internal.reciva.com>
On Thu, Nov 12, 2009 at 06:36:02PM +0000, Phil Blundell wrote:
>On Wed, 2009-11-11 at 20:34 +0000, Phil Blundell wrote:
>diff --git a/classes/base.bbclass b/classes/base.bbclass
>index 9d063f2..9508754 100644
>--- a/classes/base.bbclass
>+++ b/classes/base.bbclass
>@@ -56,6 +56,50 @@ def base_chk_load_parser(config_paths):
>
> return parser
>
>+def base_chk_file_vars(parser, localpath, params, data):
>+ try:
>+ name = params["name"]
>+ except KeyError:
>+ return False
>+ flagName = "%s.md5sum" % name
>+ want_md5sum = bb.data.getVarFlag("SRC_URI", flagName, data)
>+ flagName = "%s.sha256sum" % name
>+ want_sha256sum = bb.data.getVarFlag("SRC_URI", flagName, data)
>+
>+ if (want_sha256sum == None and want_md5sum == None):
>+ # no checksums to check, nothing to do
>+ return False
>+
>+ if not os.path.exists(localpath):
>+ localpath = base_path_out(localpath, data)
>+ bb.note("The localpath does not exist '%s'" % localpath)
>+ raise Exception("The path does not exist '%s'" % localpath)
>+
>+ if want_md5sum:
>+ try:
>+ md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath))
>+ md5data = (md5pipe.readline().split() or [ "" ])[0]
>+ md5pipe.close()
>+ except OSError, e:
>+ raise Exception("Executing md5sum failed")
>+ if want_md5sum != md5data:
>+ bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (want_md5sum, md5data))
please s/and Got/and got/g
>+ raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (want_md5sum, md5data))
Why are you providing the same information as a note and in the
exception text?
>+
>+ if want_sha256sum:
>+ try:
>+ shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath))
>+ shadata = (shapipe.readline().split() or [ "" ])[0]
>+ shapipe.close()
>+ except OSError, e:
>+ raise Exception("Executing shasum failed")
sha256sum
[]
>@@ -639,11 +683,11 @@ python base_do_fetch() {
> # Check each URI
> for url in src_uri.split():
> localpath = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
>- (type,host,path,_,_,_) = bb.decodeurl(url)
>+ (type,host,path,_,_,params) = bb.decodeurl(url)
> uri = "%s://%s%s" % (type,host,path)
> try:
> if type == "http" or type == "https" or type == "ftp" or type == "ftps":
if type in ["http", "https", "ftp", "ftps"]:
(while you're at it :)
cheers,
Bernhard
next prev parent reply other threads:[~2009-11-12 19:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 16:55 OEDEM 2009 summary: Death to checksums.ini? Phil Blundell
2009-11-11 1:06 ` Holger Hans Peter Freyther
2009-11-11 5:46 ` Frans Meulenbroeks
2009-11-11 8:24 ` Phil Blundell
2009-11-11 8:44 ` Holger Hans Peter Freyther
2009-11-11 9:17 ` Phil Blundell
2009-11-11 9:27 ` Frans Meulenbroeks
2009-11-11 9:43 ` Holger Hans Peter Freyther
2009-11-11 13:31 ` Phil Blundell
2009-11-11 13:37 ` Holger Hans Peter Freyther
2009-11-11 13:50 ` Holger Hans Peter Freyther
2009-11-11 10:06 ` Andrea Adami
2009-11-12 17:41 ` Ricardo Salveti de Araujo
2009-11-11 11:12 ` Michael 'Mickey' Lauer
2009-11-11 17:48 ` Esben Haabendal
2009-11-11 14:17 ` Richard Purdie
2009-11-11 15:45 ` Phil Blundell
2009-11-11 16:01 ` Frans Meulenbroeks
2009-11-11 16:06 ` Phil Blundell
2009-11-11 17:37 ` Frans Meulenbroeks
2009-11-11 20:34 ` Phil Blundell
2009-11-11 20:48 ` Frans Meulenbroeks
2009-11-12 18:36 ` Phil Blundell
2009-11-12 19:18 ` Bernhard Reutner-Fischer [this message]
2009-11-12 19:31 ` Phil Blundell
2009-11-13 17:47 ` Phil Blundell
2009-11-14 8:00 ` Holger Hans Peter Freyther
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=20091112191809.GG9787@mx.loc \
--to=rep.dot.nop@gmail.com \
--cc=openembedded-devel@lists.openembedded.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