From: Colin Walters <walters@verbum.org>
To: openembedded-core@lists.openembedded.org
Subject: locale packages patch
Date: Wed, 02 Jan 2013 17:50:14 -0500 [thread overview]
Message-ID: <1357167014.14851.18.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 623 bytes --]
Hi,
A GNOME contributor submitted the following patch to the gnome-ostree
system (Yocto-derived base):
https://bugzilla.gnome.org/show_bug.cgi?id=690959#c3
Any comments on whether this could be upstreamable? While we're already
carrying a few patches to oe-core, I'd obviously like to keep them as
minimal as possible.
Hmmm...in our case, we may be able to set PACKAGE_NO_LOCALE globally to
avoid split locales? But this patch may be more broadly useful if there
are projects that want say just all eglibc locales, but not translations
for everything.
For convenience, the full patch is attached.
[-- Attachment #2: oe-locales.patch --]
[-- Type: text/x-patch, Size: 2834 bytes --]
From 171a0fc3c034a8c723263f785c8524c263af8c4b Mon Sep 17 00:00:00 2001
From: Giovanni Campagna <gcampagna@src.gnome.org>
Date: Sun, 30 Dec 2012 18:15:14 +0100
Subject: [PATCH] Fix locale package generation
The package class has code to generate split language pack packages,
one, and each of those provides ${PN}-locale, so installing ${PN}-locale
ends up installing a language at random. Make ${PN}-locale a meta package
instead, and have it RDEPEND on the actual locale packages.
This allows a distro to install all translations without caring of which
are actually shipped by a particular package.
The dependency for individual locale packages on virtual-locale-* is
removed, to allow installing eglibc-locale-locale.alias (otherwise depending
on a non-existing virtual-locale-locale.alias)
https://bugzilla.gnome.org/show_bug.cgi?id=690959
---
meta/classes/package.bbclass | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 73c4358..4258dee 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -446,17 +446,28 @@ python package_do_split_locales() {
locale_section = d.getVar('LOCALE_SECTION', True)
mlprefix = d.getVar('MLPREFIX', True) or ""
pndep = base_contains('PACKAGES', pn, '%s ' % pn, '', d)
+
+ base_locale_pkg = pn + '-locale'
+ packages.append(base_locale_pkg)
+ d.setVar('ALLOW_EMPTY_' + base_locale_pkg, '1')
+ d.setVar('SUMMARY_' + base_locale_pkg, '%s - all translations' % (summary,))
+ d.setVar('DESCRIPTION_' + base_locale_pkg, '%s This metapackage depends on packages providing language translation files.' % (description,))
+ d.setVar('RDEPENDS_' + base_locale_pkg, '')
+ d.setVar('FILES_' + base_locale_pkg, '')
+ if locale_section:
+ d.setVar('SECTION_' + pkg, locale_section)
+
for l in sorted(locales):
ln = legitimize_package_name(l)
pkg = pn + '-locale-' + ln
packages.append(pkg)
d.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l))
- d.setVar('RDEPENDS_' + pkg, '%s%svirtual-locale-%s' % (pndep, mlprefix, ln))
- d.setVar('RPROVIDES_' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln))
+ d.setVar('RDEPENDS_' + pkg, pndep)
d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l))
d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
if locale_section:
d.setVar('SECTION_' + pkg, locale_section)
+ d.setVar('RDEPENDS_' + base_locale_pkg, '%s %s' % (d.getVar('RDEPENDS_' + base_locale_pkg, True), pkg))
d.setVar('PACKAGES', ' '.join(packages))
--
1.8.0.1
reply other threads:[~2013-01-02 23:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1357167014.14851.18.camel@localhost \
--to=walters@verbum.org \
--cc=openembedded-core@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