All of lore.kernel.org
 help / color / mirror / Atom feed
* Potential Problems in glibc-package.bbclass
@ 2007-02-28 16:25 Hans Henry von Tresckow
  2007-03-08 14:32 ` Jan Janssens
  2007-03-08 14:39 ` Koen Kooi
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Henry von Tresckow @ 2007-02-28 16:25 UTC (permalink / raw)
  To: openembedded-devel

I think I may have stumbled across some potential bugs in glibc-package.bbclass:

it seems like the standard value for datadir is /usr/share which will
cause the following problems in output_locale_binary:

1) i18npath will be set to /usr/share/i18n instead of
treedir/usr/share/i18n becouse path.join is too braindead to remove
leading / on path entries.
2) the --inputfile option in localdef opts uses datadir instead of
treedir, so it looks like it would use the locale files installed on
the host instead of the ones we are buildig for.

Am I missing something here or should I file this as a bug?



-------------source starts here------------------------------------
def output_locale_binary(name, locale, encoding):
		target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
		qemu = "qemu-%s -r 2.6.16" % target_arch
		pkgname = 'locale-base-' + legitimize_package_name(name)
		m = re.match("(.*)\.(.*)", name)
		if m:
			glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
		else:
			glibc_name = name
		bb.data.setVar('RDEPENDS_%s' % pkgname,
legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d)
		rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
		m = re.match("(.*)_(.*)", name)
		if m:
			rprovides += ' virtual-locale-%s' % m.group(1)
		bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
		bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
		bb.data.setVar('PACKAGES', '%s %s' % (pkgname,
bb.data.getVar('PACKAGES', d, 1)), d)

		treedir = os.path.join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
		path = bb.data.getVar("PATH", d, 1)
		i18npath = os.path.join(treedir, datadir, "i18n")

		localedef_opts = "--force --old-style --no-archive --prefix=%s
--inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir,
locale, encoding, name)
		cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" %
(path, i18npath, qemu, treedir, treedir, localedef_opts)
		bb.note("generating locale %s (%s)" % (locale, encoding))
		if os.system(cmd):
			raise bb.build.FuncFailed("localedef returned an error (command was
%s)." % cmd)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Potential Problems in glibc-package.bbclass
  2007-02-28 16:25 Potential Problems in glibc-package.bbclass Hans Henry von Tresckow
@ 2007-03-08 14:32 ` Jan Janssens
  2007-03-08 14:39 ` Koen Kooi
  1 sibling, 0 replies; 6+ messages in thread
From: Jan Janssens @ 2007-03-08 14:32 UTC (permalink / raw)
  To: openembedded-devel

For me the locale building process is working, even though it indeed
looks (from your analysis) like there are issues. I've looked at an
i18n problem in the past (with utf8 locales), but there was not a lot
of response from the list. Looks like there are no real glibc/locale
experts around...

Anyway: I think you should open a bug and attach a patch. In the end
someone will most likely have a look at it.

And hopefully, now that OpenMoko is getting into gear, there will be
more development interest in OpenEmbedded.

Regards,

Jan.

On 2/28/07, Hans Henry von Tresckow <hvontres@gmail.com> wrote:
> I think I may have stumbled across some potential bugs in glibc-package.bbclass:
>
> it seems like the standard value for datadir is /usr/share which will
> cause the following problems in output_locale_binary:
>
> 1) i18npath will be set to /usr/share/i18n instead of
> treedir/usr/share/i18n becouse path.join is too braindead to remove
> leading / on path entries.
> 2) the --inputfile option in localdef opts uses datadir instead of
> treedir, so it looks like it would use the locale files installed on
> the host instead of the ones we are buildig for.
>
> Am I missing something here or should I file this as a bug?
>
>
>
> -------------source starts here------------------------------------
> def output_locale_binary(name, locale, encoding):
>                 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
>                 qemu = "qemu-%s -r 2.6.16" % target_arch
>                 pkgname = 'locale-base-' + legitimize_package_name(name)
>                 m = re.match("(.*)\.(.*)", name)
>                 if m:
>                         glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
>                 else:
>                         glibc_name = name
>                 bb.data.setVar('RDEPENDS_%s' % pkgname,
> legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d)
>                 rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
>                 m = re.match("(.*)_(.*)", name)
>                 if m:
>                         rprovides += ' virtual-locale-%s' % m.group(1)
>                 bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
>                 bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
>                 bb.data.setVar('PACKAGES', '%s %s' % (pkgname,
> bb.data.getVar('PACKAGES', d, 1)), d)
>
>                 treedir = os.path.join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
>                 path = bb.data.getVar("PATH", d, 1)
>                 i18npath = os.path.join(treedir, datadir, "i18n")
>
>                 localedef_opts = "--force --old-style --no-archive --prefix=%s
> --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir,
> locale, encoding, name)
>                 cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" %
> (path, i18npath, qemu, treedir, treedir, localedef_opts)
>                 bb.note("generating locale %s (%s)" % (locale, encoding))
>                 if os.system(cmd):
>                         raise bb.build.FuncFailed("localedef returned an error (command was
> %s)." % cmd)
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Potential Problems in glibc-package.bbclass
  2007-02-28 16:25 Potential Problems in glibc-package.bbclass Hans Henry von Tresckow
  2007-03-08 14:32 ` Jan Janssens
@ 2007-03-08 14:39 ` Koen Kooi
  2007-05-07 10:39   ` Koen Kooi
  1 sibling, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2007-03-08 14:39 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans Henry von Tresckow schreef:
> I think I may have stumbled across some potential bugs in glibc-package.bbclass:
> 
> it seems like the standard value for datadir is /usr/share which will
> cause the following problems in output_locale_binary:
> 
> 1) i18npath will be set to /usr/share/i18n instead of
> treedir/usr/share/i18n becouse path.join is too braindead to remove
> leading / on path entries.
> 2) the --inputfile option in localdef opts uses datadir instead of
> treedir, so it looks like it would use the locale files installed on
> the host instead of the ones we are buildig for.
> 

There now is a base_path_join function in OE, that doesn't have that bug. No idea why
glibc.bbclass hasn't been updated to use that.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFF8CALMkyGM64RGpERAtfLAKCOxA7HXzE3gec8hEeTRZXALOtwKACfcD3O
RgVrnKYxJM3MzxL56Etc1rQ=
=+hl1
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Potential Problems in glibc-package.bbclass
  2007-03-08 14:39 ` Koen Kooi
@ 2007-05-07 10:39   ` Koen Kooi
  2007-05-07 10:43     ` Paul Sokolovsky
  0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2007-05-07 10:39 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Koen Kooi schreef:
> Hans Henry von Tresckow schreef:
>> I think I may have stumbled across some potential bugs in glibc-package.bbclass:
> 
>> it seems like the standard value for datadir is /usr/share which will
>> cause the following problems in output_locale_binary:
> 
>> 1) i18npath will be set to /usr/share/i18n instead of
>> treedir/usr/share/i18n becouse path.join is too braindead to remove
>> leading / on path entries.
>> 2) the --inputfile option in localdef opts uses datadir instead of
>> treedir, so it looks like it would use the locale files installed on
>> the host instead of the ones we are buildig for.
> 
> 
> There now is a base_path_join function in OE, that doesn't have that bug. No idea why
> glibc.bbclass hasn't been updated to use that.

See http://bugs.openembedded.org/show_bug.cgi?id=1821#c9 for the proposed solution for at
least 1).

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGPwHPMkyGM64RGpERAjMsAJ9hwzbjdM/QDmpE/gPkB9taIK7wgACePfxv
E306nGzJX80t3kuMxbtqe+Y=
=W3Un
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Potential Problems in glibc-package.bbclass
  2007-05-07 10:39   ` Koen Kooi
@ 2007-05-07 10:43     ` Paul Sokolovsky
  2007-05-07 10:54       ` Koen Kooi
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Sokolovsky @ 2007-05-07 10:43 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

Hello Koen,

Monday, May 7, 2007, 1:39:11 PM, you wrote:

[]

>>> I think I may have stumbled across some potential bugs in glibc-package.bbclass:
>> 
>>> it seems like the standard value for datadir is /usr/share which will
>>> cause the following problems in output_locale_binary:
>> 
>>> 1) i18npath will be set to /usr/share/i18n instead of
>>> treedir/usr/share/i18n becouse path.join is too braindead to remove
>>> leading / on path entries.
>>> 2) the --inputfile option in localdef opts uses datadir instead of
>>> treedir, so it looks like it would use the locale files installed on
>>> the host instead of the ones we are buildig for.
>> 
>> 
>> There now is a base_path_join function in OE, that doesn't have that bug. No idea why
>> glibc.bbclass hasn't been updated to use that.

> See http://bugs.openembedded.org/show_bug.cgi?id=1821#c9 for the proposed solution for at
> least 1).

        This is indeed few months old. Let's apply it?


> regards,

> Koen

[]

-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Potential Problems in glibc-package.bbclass
  2007-05-07 10:43     ` Paul Sokolovsky
@ 2007-05-07 10:54       ` Koen Kooi
  0 siblings, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2007-05-07 10:54 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:

>> See http://bugs.openembedded.org/show_bug.cgi?id=1821#c9 for the proposed solution for at
>> least 1).
> 
>         This is indeed few months old. Let's apply it?

Fine by me.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGPwVqMkyGM64RGpERArHoAJ9fW1sGGBVZi0l8TpEruHO9eOJV6gCgnGjj
5Gy2vWx5lGYRjcnSlp2TouA=
=Y7wS
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-05-07 10:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-28 16:25 Potential Problems in glibc-package.bbclass Hans Henry von Tresckow
2007-03-08 14:32 ` Jan Janssens
2007-03-08 14:39 ` Koen Kooi
2007-05-07 10:39   ` Koen Kooi
2007-05-07 10:43     ` Paul Sokolovsky
2007-05-07 10:54       ` Koen Kooi

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.