| Submitter | Lianhao Lu |
|---|---|
| Date | May 17, 2012, 9:25 a.m. |
| Message ID | <932f6592281b43603354b0b41ff4e292548190c7.1337246557.git.lianhao.lu@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/27887/ |
| State | Accepted |
| Commit | a52f7cf2cc90d918e3250c410995dcc1f3bfd5ee |
| Headers | show |
Comments
On Thu, May 17, 2012 at 2:25 AM, Lianhao Lu <lianhao.lu@intel.com> wrote: > Added multilib prefix to the locale related package names/dependencies. > > Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Does mlprefix already has a leading '-' ? otherwise I think adding a - would make is more readable. > --- > meta/classes/libc-package.bbclass | 4 ++-- > meta/classes/package.bbclass | 5 +++-- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass > index 57b6fd9..10f5f87 100644 > --- a/meta/classes/libc-package.bbclass > +++ b/meta/classes/libc-package.bbclass > @@ -308,10 +308,10 @@ python package_do_split_gconvs () { > pkgname = d.getVar('MLPREFIX') + 'locale-base-' + legitimize_package_name(name) > d.setVar('ALLOW_EMPTY_%s' % pkgname, '1') > d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', True))) > - rprovides = ' virtual-locale-%s' % legitimize_package_name(name) > + rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name)) > m = re.match("(.*)_(.*)", name) > if m: > - rprovides += ' virtual-locale-%s' % m.group(1) > + rprovides += ' %svirtual-locale-%s' % (mlprefix, m.group(1)) > d.setVar('RPROVIDES_%s' % pkgname, rprovides) > > if use_bin == "compile": > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index 99836e9..6fba5b6 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -400,13 +400,14 @@ python package_do_split_locales() { > summary = d.getVar('SUMMARY', True) or pn > description = d.getVar('DESCRIPTION', True) or "" > locale_section = d.getVar('LOCALE_SECTION', True) > + mlprefix = d.getVar('MLPREFIX', True) or "" > 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 virtual-locale-%s' % (pn, ln)) > - d.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln)) > + d.setVar('RDEPENDS_' + pkg, '%s %svirtual-locale-%s' % (pn, mlprefix, ln)) > + d.setVar('RPROVIDES_' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln)) > 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: > -- > 1.7.0.4 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
On Thu, 2012-05-17 at 11:12 -0700, Khem Raj wrote: > On Thu, May 17, 2012 at 2:25 AM, Lianhao Lu <lianhao.lu@intel.com> wrote: > > Added multilib prefix to the locale related package names/dependencies. > > > > Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> > > Does mlprefix already has a leading '-' ? > otherwise I think adding a - would make is more readable. mlprefix adds this. Trying to do this the other way makes things too difficult and potentially inconsistent. Cheers, Richard
Patch
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 57b6fd9..10f5f87 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -308,10 +308,10 @@ python package_do_split_gconvs () { pkgname = d.getVar('MLPREFIX') + 'locale-base-' + legitimize_package_name(name) d.setVar('ALLOW_EMPTY_%s' % pkgname, '1') d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', True))) - rprovides = ' virtual-locale-%s' % legitimize_package_name(name) + rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name)) m = re.match("(.*)_(.*)", name) if m: - rprovides += ' virtual-locale-%s' % m.group(1) + rprovides += ' %svirtual-locale-%s' % (mlprefix, m.group(1)) d.setVar('RPROVIDES_%s' % pkgname, rprovides) if use_bin == "compile": diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 99836e9..6fba5b6 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -400,13 +400,14 @@ python package_do_split_locales() { summary = d.getVar('SUMMARY', True) or pn description = d.getVar('DESCRIPTION', True) or "" locale_section = d.getVar('LOCALE_SECTION', True) + mlprefix = d.getVar('MLPREFIX', True) or "" 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 virtual-locale-%s' % (pn, ln)) - d.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln)) + d.setVar('RDEPENDS_' + pkg, '%s %svirtual-locale-%s' % (pn, mlprefix, ln)) + d.setVar('RPROVIDES_' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln)) 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:
Added multilib prefix to the locale related package names/dependencies. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> --- meta/classes/libc-package.bbclass | 4 ++-- meta/classes/package.bbclass | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-)