Patchwork [RFC,2/2] package.bbclass: remove RRECOMMENDS on base packages for locale packages

login
register
mail settings
Submitter Andreas Müller
Date Jan. 18, 2013, 12:41 p.m.
Message ID <1358512909-14714-3-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/42881/
State Accepted
Commit b71a16e8ac18b5633ac3a52c60ad78dde37ede7b
Headers show

Comments

Andreas Müller - Jan. 18, 2013, 12:41 p.m.
As long as we support only one locale package per recipe this leads to unwanted
packages in images. This patch was motivated by samba (meta-oe): only wanting
libsmbclient one gets full samba server into the image. For my standard image
the follwing package were removed by this patch:

-acl_2.2.51-r3_armv7a-vfp-neon.ipk
-alsa-states_0.2.0-r3_armv7a-vfp-neon.ipk
-alsa-utils_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aconnect_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsaconf_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsactl_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsaloop_1.0.25-r3_armv7a-vfp-neon.ipk
 alsa-utils-alsamixer_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsaucm_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-amixer_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aplay_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aseqdump_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aseqnet_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-iecset_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-midi_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-speakertest_1.0.25-r3_armv7a-vfp-neon.ipk
-attr_2.4.46-r4_armv7a-vfp-neon.ipk
-avahi_0.6.31-r7.1_armv7a-vfp-neon.ipk
-gtk-engines_2.20.2-r3_armv7a-vfp-neon.ipk
-pulseaudio_2.1-r15_armv7a-vfp-neon.ipk
-samba_3.6.8-r6_armv7a-vfp-neon.ipk
-vte_0.28.2-r5_armv7a-vfp-neon.ipk
-xz_5.1.2alpha-r0_armv7a-vfp-neon.ipk

Strange effect: For samba buildhistory's depends.dot says:
-samba -> libc6;
-samba -> libgcc1;
-samba -> libreadline6;
-samba -> libtalloc2;
-samba -> libtdb1;
-samba -> libwbclient0;
-samba -> libz1;
-samba -> update_rc_d;
-samba_locale_de -> samba [style=dotted];
 samba_locale_de -> virtual_locale_de [style=dotted];
-samba_locale_fr -> samba [style=dotted];
-samba_locale_fr -> samba [style=dotted];

This is conflicts to buildhistory's result on samba package not mentioning
any changes for samba package.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta/classes/package.bbclass |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Andreas Müller - Jan. 24, 2013, 8:37 a.m.
On Fri, Jan 18, 2013 at 1:41 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> As long as we support only one locale package per recipe this leads to unwanted
> packages in images. This patch was motivated by samba (meta-oe): only wanting
> libsmbclient one gets full samba server into the image. For my standard image
> the follwing package were removed by this patch:
>
I am using this now for a while without issues (except reduced image
size) - so ping

Andreas
Saul Wold - Jan. 24, 2013, 6:54 p.m.
On 01/18/2013 04:41 AM, Andreas Müller wrote:
> As long as we support only one locale package per recipe this leads to unwanted
> packages in images. This patch was motivated by samba (meta-oe): only wanting
> libsmbclient one gets full samba server into the image. For my standard image
> the follwing package were removed by this patch:
>
> -acl_2.2.51-r3_armv7a-vfp-neon.ipk
> -alsa-states_0.2.0-r3_armv7a-vfp-neon.ipk
> -alsa-utils_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-aconnect_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-alsaconf_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-alsactl_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-alsaloop_1.0.25-r3_armv7a-vfp-neon.ipk
>   alsa-utils-alsamixer_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-alsaucm_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-amixer_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-aplay_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-aseqdump_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-aseqnet_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-iecset_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-midi_1.0.25-r3_armv7a-vfp-neon.ipk
> -alsa-utils-speakertest_1.0.25-r3_armv7a-vfp-neon.ipk
> -attr_2.4.46-r4_armv7a-vfp-neon.ipk
> -avahi_0.6.31-r7.1_armv7a-vfp-neon.ipk
> -gtk-engines_2.20.2-r3_armv7a-vfp-neon.ipk
> -pulseaudio_2.1-r15_armv7a-vfp-neon.ipk
> -samba_3.6.8-r6_armv7a-vfp-neon.ipk
> -vte_0.28.2-r5_armv7a-vfp-neon.ipk
> -xz_5.1.2alpha-r0_armv7a-vfp-neon.ipk
>
So what affect does it have on the oe-core images such as 
core-image-minimal and core-image-sato?


> Strange effect: For samba buildhistory's depends.dot says:
> -samba -> libc6;
> -samba -> libgcc1;
> -samba -> libreadline6;
> -samba -> libtalloc2;
> -samba -> libtdb1;
> -samba -> libwbclient0;
> -samba -> libz1;
> -samba -> update_rc_d;
> -samba_locale_de -> samba [style=dotted];
>   samba_locale_de -> virtual_locale_de [style=dotted];
> -samba_locale_fr -> samba [style=dotted];
> -samba_locale_fr -> samba [style=dotted];
>
> This is conflicts to buildhistory's result on samba package not mentioning
> any changes for samba package.
>
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>   meta/classes/package.bbclass |    3 +--
>   1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index b06cca5..73e8de8 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -455,13 +455,12 @@ python package_do_split_locales() {
>       description = d.getVar('DESCRIPTION', True) or ""
>       locale_section = d.getVar('LOCALE_SECTION', True)
>       mlprefix = d.getVar('MLPREFIX', True) or ""
> -    pndep = base_contains('PACKAGES', pn, '%s ' % pn, '', d)
>       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('RRECOMMENDS_' + pkg, '%s%svirtual-locale-%s' % (pndep, mlprefix, ln))
> +        d.setVar('RRECOMMENDS_' + pkg, '%svirtual-locale-%s' % (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))
>

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index b06cca5..73e8de8 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -455,13 +455,12 @@  python package_do_split_locales() {
     description = d.getVar('DESCRIPTION', True) or ""
     locale_section = d.getVar('LOCALE_SECTION', True)
     mlprefix = d.getVar('MLPREFIX', True) or ""
-    pndep = base_contains('PACKAGES', pn, '%s ' % pn, '', d)
     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('RRECOMMENDS_' + pkg, '%s%svirtual-locale-%s' % (pndep, mlprefix, ln))
+        d.setVar('RRECOMMENDS_' + pkg, '%svirtual-locale-%s' % (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))