Patchwork [1/2] libc-package bbclass: fix binary localedata dependency code

login
register
mail settings
Submitter Phil Blundell
Date Aug. 26, 2011, 2:12 p.m.
Message ID <1314367938.19905.90.camel@phil-desktop>
Download mbox | patch
Permalink /patch/10611/
State New, archived
Headers show

Comments

Phil Blundell - Aug. 26, 2011, 2:12 p.m.
On Thu, 2011-08-25 at 07:58 -0700, Richard Purdie wrote:
> On Thu, 2011-08-25 at 10:24 +0100, Phil Blundell wrote:
> > On Wed, 2011-08-24 at 20:32 +0200, Koen Kooi wrote:
> > > diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
> > > index 0d5ce20..d3b33d6 100644
> > > --- a/meta/classes/libc-package.bbclass
> > > +++ b/meta/classes/libc-package.bbclass
> > > @@ -243,7 +243,7 @@ python package_do_split_gconvs () {
> > >  	def output_locale_binary_rdepends(name, pkgname, locale, encoding):
> > >  		m = re.match("(.*)_(.*)", name)
> > >  		if m:
> > > -			libc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
> > > +			libc_name = "%s-%s" % (m.group(1), m.group(2).lower().replace("-",""))
> > >  		else:
> > >  			libc_name = name
> > >  		bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
> > 
> > For what it's worth (probably not much), this is not quite the right
> > fix.  Joining with "." was correct; it was the splitting on "_" that was
> > wrong.  The right thing would be to put it back how it was before the
> > glibc/eglibc merge commit, i.e. change the re to "(*.)\.(*.)" and leave
> > the output pattern alone.  That ought to fix your problem and also allow
> > the encoding to be correctly canonicalised.
> 
> Can someone please send me the correct patch against master? :)

I think the attached is what you need.  Koen, maybe you could confirm
whether this does indeed fix your original problem.

p.
Koen Kooi - Aug. 26, 2011, 2:54 p.m.
Op 26 aug. 2011, om 16:12 heeft Phil Blundell het volgende geschreven:

> On Thu, 2011-08-25 at 07:58 -0700, Richard Purdie wrote:
>> On Thu, 2011-08-25 at 10:24 +0100, Phil Blundell wrote:
>>> On Wed, 2011-08-24 at 20:32 +0200, Koen Kooi wrote:
>>>> diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
>>>> index 0d5ce20..d3b33d6 100644
>>>> --- a/meta/classes/libc-package.bbclass
>>>> +++ b/meta/classes/libc-package.bbclass
>>>> @@ -243,7 +243,7 @@ python package_do_split_gconvs () {
>>>> 	def output_locale_binary_rdepends(name, pkgname, locale, encoding):
>>>> 		m = re.match("(.*)_(.*)", name)
>>>> 		if m:
>>>> -			libc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
>>>> +			libc_name = "%s-%s" % (m.group(1), m.group(2).lower().replace("-",""))
>>>> 		else:
>>>> 			libc_name = name
>>>> 		bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
>>> 
>>> For what it's worth (probably not much), this is not quite the right
>>> fix.  Joining with "." was correct; it was the splitting on "_" that was
>>> wrong.  The right thing would be to put it back how it was before the
>>> glibc/eglibc merge commit, i.e. change the re to "(*.)\.(*.)" and leave
>>> the output pattern alone.  That ought to fix your problem and also allow
>>> the encoding to be correctly canonicalised.
>> 
>> Can someone please send me the correct patch against master? :)
> 
> I think the attached is what you need.  Koen, maybe you could confirm
> whether this does indeed fix your original problem.

doing a test build now, will report back later
Koen Kooi - Aug. 26, 2011, 3:26 p.m.
Op 26 aug. 2011, om 16:12 heeft Phil Blundell het volgende geschreven:

> On Thu, 2011-08-25 at 07:58 -0700, Richard Purdie wrote:
>> On Thu, 2011-08-25 at 10:24 +0100, Phil Blundell wrote:
>>> On Wed, 2011-08-24 at 20:32 +0200, Koen Kooi wrote:
>>>> diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
>>>> index 0d5ce20..d3b33d6 100644
>>>> --- a/meta/classes/libc-package.bbclass
>>>> +++ b/meta/classes/libc-package.bbclass
>>>> @@ -243,7 +243,7 @@ python package_do_split_gconvs () {
>>>> 	def output_locale_binary_rdepends(name, pkgname, locale, encoding):
>>>> 		m = re.match("(.*)_(.*)", name)
>>>> 		if m:
>>>> -			libc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
>>>> +			libc_name = "%s-%s" % (m.group(1), m.group(2).lower().replace("-",""))
>>>> 		else:
>>>> 			libc_name = name
>>>> 		bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
>>> 
>>> For what it's worth (probably not much), this is not quite the right
>>> fix.  Joining with "." was correct; it was the splitting on "_" that was
>>> wrong.  The right thing would be to put it back how it was before the
>>> glibc/eglibc merge commit, i.e. change the re to "(*.)\.(*.)" and leave
>>> the output pattern alone.  That ought to fix your problem and also allow
>>> the encoding to be correctly canonicalised.
>> 
>> Can someone please send me the correct patch against master? :)
> 
> I think the attached is what you need.  Koen, maybe you could confirm
> whether this does indeed fix your original problem.

I built some images before applying this patch and then:

bitbake -ccleansstate eglibc eglibc-locale
bitbake systemd-image

And that gives me http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/testlab/commit/?h=yocto&id=9b2e08e0c4da4881ba8c83be39697a40a63b75fd

-locale_base_en_us -> eglibc_binary_localedata_en_us;
+locale_base_en_us -> eglibc_binary_localedata_en_u_;

So something regexp is being a bit too greedy by the looks of it.

Patch

From 1cd91a91802776ddede041cfa222b603da6c8453 Mon Sep 17 00:00:00 2001
From: Phil Blundell <philb@gnu.org>
Date: Fri, 26 Aug 2011 15:05:11 +0100
Subject: [PATCH] libc-package: restore correct mangling behavior for locale names

This reverts 19fb07bf337e1d724798e2eb4479c35fc45b1941 and restores
the behaviour of the code to the way it was prior to 561d875404ef1783f94f37314b6e756766db8411.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-August/007407.html and subsequent messages.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/libc-package.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index d3b33d6..f8df6a4 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -241,9 +241,9 @@  python package_do_split_gconvs () {
 		(locale, encoding, locale), d)
 
 	def output_locale_binary_rdepends(name, pkgname, locale, encoding):
-		m = re.match("(.*)_(.*)", name)
+		m = re.match("(.*).(.*)", name)
 		if m:
-			libc_name = "%s-%s" % (m.group(1), m.group(2).lower().replace("-",""))
+			libc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
 		else:
 			libc_name = name
 		bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
-- 
1.7.4.1