Patchwork [6/7] package: allow setting a section for locale packages

login
register
mail settings
Submitter Christopher Larson
Date Aug. 11, 2011, 6:23 p.m.
Message ID <642776595a038851117db831a1212c7d0111e979.1313086806.git.chris_larson@mentor.com>
Download mbox | patch
Permalink /patch/9649/
State New, archived
Headers show

Comments

Christopher Larson - Aug. 11, 2011, 6:23 p.m.
From: Chris Larson <chris_larson@mentor.com>

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 meta/classes/package.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0a954ef..100f465 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -44,6 +44,8 @@  inherit prserv
 PKGD    = "${WORKDIR}/package"
 PKGDEST = "${WORKDIR}/packages-split"
 
+LOCALE_SECTION ?= ''
+
 # rpm is used for the per-file dependency identification
 PACKAGE_DEPENDS += "rpm-native"
 
@@ -401,6 +403,7 @@  python package_do_split_locales() {
 
 	summary = bb.data.getVar('SUMMARY', d, True) or pn
 	description = bb.data.getVar('DESCRIPTION', d, True) or "" 
+        locale_section = bb.data.getVar('LOCALE_SECTION', d, True)
 	for l in locales:
 		ln = legitimize_package_name(l)
 		pkg = pn + '-locale-' + ln
@@ -410,6 +413,8 @@  python package_do_split_locales() {
 		bb.data.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln), d)
 		bb.data.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l), d)
 		bb.data.setVar('DESCRIPTION_' + pkg, '%s  This package contains language translation files for the %s locale.' % (description, l), d)
+		if locale_section:
+			bb.data.setVar('SECTION_' + pkg, locale_section, d)
 
 	bb.data.setVar('PACKAGES', ' '.join(packages), d)