All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@openembedded.org
Subject: Re: [STABLE][PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
Date: Wed, 22 Apr 2009 08:22:50 +0200	[thread overview]
Message-ID: <gsmd3q$62k$2@ger.gmane.org> (raw)
In-Reply-To: <1240380414-8068-1-git-send-email-denis@denix.org>

On 22-04-09 08:06, Denys Dmytriyenko wrote:
> From: Petri Lehtinen<petri.lehtinen@inoi.fi>

Acked-by: Koen Kooi <koen@openembedded.org>

>
> This makes it possible for overlays to have checksum.ini.
>
> Signed-off-by: Denys Dmytriyenko<denis@denix.org>
> ---
>   classes/base.bbclass |   22 +++++++++++++---------
>   1 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/classes/base.bbclass b/classes/base.bbclass
> index 9ec705b..e5fd814 100644
> --- a/classes/base.bbclass
> +++ b/classes/base.bbclass
> @@ -40,12 +40,11 @@ def base_path_relative(src, dest):
>       return sep.join(relpath)
>
>   # for MD5/SHA handling
> -def base_chk_load_parser(config_path):
> +def base_chk_load_parser(config_paths):
>       import ConfigParser, os, bb
>       parser = ConfigParser.ConfigParser()
> -    if not len(parser.read(config_path)) == 1:
> -        bb.note("Can not open the '%s' ini file" % config_path)
> -        raise Exception("Can not open the '%s'" % config_path)
> +    if len(parser.read(config_paths))<  1:
> +        raise ValueError("no ini files could be found")
>
>       return parser
>
> @@ -620,13 +619,18 @@ python base_do_fetch() {
>
>   	# Verify the SHA and MD5 sums we have in OE and check what do
>   	# in
> -	check_sum = bb.which(bb.data.getVar('BBPATH', d, True), "conf/checksums.ini")
> -	if not check_sum:
> -		bb.note("No conf/checksums.ini found, not checking checksums")
> -		return
> +	checksum_paths = bb.data.getVar('BBPATH', d, True).split(":")
> +
> +	# reverse the list to give precedence to directories that
> +	# appear first in BBPATH
> +	checksum_paths.reverse()
>
> +	checksum_files = ["%s/conf/checksums.ini" % path for path in checksum_paths]
>   	try:
> -		parser = base_chk_load_parser(check_sum)
> +		parser = base_chk_load_parser(checksum_files)
> +	except ValueError:
> +		bb.note("No conf/checksums.ini found, not checking checksums")
> +		return
>   	except:
>   		bb.note("Creating the CheckSum parser failed")
>   		return





  reply	other threads:[~2009-04-22  6:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22  6:06 [STABLE][PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH Denys Dmytriyenko
2009-04-22  6:22 ` Koen Kooi [this message]
2009-04-22 16:24   ` Tom Rini

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='gsmd3q$62k$2@ger.gmane.org' \
    --to=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=openembedded-devel@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 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.