* [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
@ 2009-04-15 7:59 petri.lehtinen+openembedded-devel
2009-04-15 18:22 ` Khem Raj
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: petri.lehtinen+openembedded-devel @ 2009-04-15 7:59 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
From: Petri Lehtinen <petri.lehtinen@inoi.fi>
This makes it possible for overlays to have checksum.ini.
Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
---
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
--
1.6.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
2009-04-15 7:59 [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH petri.lehtinen+openembedded-devel
@ 2009-04-15 18:22 ` Khem Raj
2009-04-16 0:05 ` Denys Dmytriyenko
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2009-04-15 18:22 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
On (15/04/09 10:59), petri.lehtinen+openembedded-devel@inoi.fi wrote:
> From: Petri Lehtinen <petri.lehtinen@inoi.fi>
>
> This makes it possible for overlays to have checksum.ini.
>
> Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
> ---
> 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
> --
Looks good to me.
> 1.6.0.4
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
2009-04-15 7:59 [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH petri.lehtinen+openembedded-devel
2009-04-15 18:22 ` Khem Raj
@ 2009-04-16 0:05 ` Denys Dmytriyenko
2009-04-16 0:23 ` Chris Larson
2009-04-22 5:04 ` Petri Lehtinen
3 siblings, 0 replies; 9+ messages in thread
From: Denys Dmytriyenko @ 2009-04-16 0:05 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
On Wed, Apr 15, 2009 at 10:59:55AM +0300, petri.lehtinen+openembedded-devel@inoi.fi wrote:
> From: Petri Lehtinen <petri.lehtinen@inoi.fi>
>
> This makes it possible for overlays to have checksum.ini.
Tested on my overlay - seems to work as advertised.
Acked-by: Denys Dmytriyenko <denis@denix.org>
> Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
> ---
> 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
> --
> 1.6.0.4
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
2009-04-15 7:59 [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH petri.lehtinen+openembedded-devel
2009-04-15 18:22 ` Khem Raj
2009-04-16 0:05 ` Denys Dmytriyenko
@ 2009-04-16 0:23 ` Chris Larson
2009-04-16 12:32 ` Otavio Salvador
2009-04-22 5:04 ` Petri Lehtinen
3 siblings, 1 reply; 9+ messages in thread
From: Chris Larson @ 2009-04-16 0:23 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
On Wed, Apr 15, 2009 at 12:59 AM,
<petri.lehtinen+openembedded-devel@inoi.fi> wrote:
> From: Petri Lehtinen <petri.lehtinen@inoi.fi>
>
> This makes it possible for overlays to have checksum.ini.
>
> Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
Nice feature, good to see.
--
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
2009-04-15 7:59 [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH petri.lehtinen+openembedded-devel
` (2 preceding siblings ...)
2009-04-16 0:23 ` Chris Larson
@ 2009-04-22 5:04 ` Petri Lehtinen
2009-04-22 5:44 ` Denys Dmytriyenko
3 siblings, 1 reply; 9+ messages in thread
From: Petri Lehtinen @ 2009-04-22 5:04 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
Any more comments on this? Could someone push it?
I would like very much to see this in stable, too.
--
Petri Lehtinen
Software Specialist
Inoi Oy
Tel. : +358 40 758 0229
Email: petri.lehtinen@inoi.fi
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
2009-04-22 5:04 ` Petri Lehtinen
@ 2009-04-22 5:44 ` Denys Dmytriyenko
2009-04-22 6:54 ` Petri Lehtinen
0 siblings, 1 reply; 9+ messages in thread
From: Denys Dmytriyenko @ 2009-04-22 5:44 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
On Wed, Apr 22, 2009 at 08:04:23AM +0300, Petri Lehtinen wrote:
> Any more comments on this? Could someone push it?
>
> I would like very much to see this in stable, too.
Actually, it was already pushed in 4b48c66ff661c3b88f85dee62517a31ae66db242
--
Denys
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH
2009-04-22 5:44 ` Denys Dmytriyenko
@ 2009-04-22 6:54 ` Petri Lehtinen
2009-04-22 7:01 ` Petri Lehtinen
0 siblings, 1 reply; 9+ messages in thread
From: Petri Lehtinen @ 2009-04-22 6:54 UTC (permalink / raw)
To: openembedded-devel; +Cc: Petri Lehtinen
Denys Dmytriyenko wrote:
> On Wed, Apr 22, 2009 at 08:04:23AM +0300, Petri Lehtinen wrote:
> > Any more comments on this? Could someone push it?
> >
> > I would like very much to see this in stable, too.
>
> Actually, it was already pushed in 4b48c66ff661c3b88f85dee62517a31ae66db242
Ahh, my bad. Many thanks.
Is there any chance on getting this to stable, too?
--
Petri Lehtinen
Software Specialist
Inoi Oy
Tel. : +358 40 758 0229
Email: petri.lehtinen@inoi.fi
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-04-22 7:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 7:59 [PATCH] base.bbclass: Combine all checksum.ini files found in BBPATH petri.lehtinen+openembedded-devel
2009-04-15 18:22 ` Khem Raj
2009-04-16 0:05 ` Denys Dmytriyenko
2009-04-16 0:23 ` Chris Larson
2009-04-16 12:32 ` Otavio Salvador
2009-04-22 5:04 ` Petri Lehtinen
2009-04-22 5:44 ` Denys Dmytriyenko
2009-04-22 6:54 ` Petri Lehtinen
2009-04-22 7:01 ` Petri Lehtinen
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.