Patchwork gtk-icon-cache bbclass: only add runtime dependencies on hicolor-icon-theme when installing icons

login
register
mail settings
Submitter Koen Kooi
Date Aug. 1, 2011, 11:08 a.m.
Message ID <1312196922-20019-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/8959/
State New, archived
Headers show

Comments

Koen Kooi - Aug. 1, 2011, 11:08 a.m.
Tested with gnome-icon-theme and libsoup recipes on angstrom.

Signed-off-by: Koen Kooi <koen@openembedded.org>
---
 meta/classes/gtk-icon-cache.bbclass |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
Saul Wold - Aug. 4, 2011, 2:47 p.m.
On 08/01/2011 04:08 AM, Koen Kooi wrote:
> Tested with gnome-icon-theme and libsoup recipes on angstrom.
>
> Signed-off-by: Koen Kooi<koen@openembedded.org>
> ---
>   meta/classes/gtk-icon-cache.bbclass |    8 ++++++--
>   1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
> index dcabaf5..d9b5d1b 100644
> --- a/meta/classes/gtk-icon-cache.bbclass
> +++ b/meta/classes/gtk-icon-cache.bbclass
> @@ -1,5 +1,4 @@
>   FILES_${PN} += "${datadir}/icons/hicolor"
> -RDEPENDS += "hicolor-icon-theme"
>
>   # This could run on the host as icon cache files are architecture independent,
>   # but there is no gtk-update-icon-cache built natively.
> @@ -34,7 +33,12 @@ python populate_packages_append () {
>   		icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, bb.data.getVar('datadir', d, 1))
>   		if not os.path.exists(icon_dir):
>   			continue
> -		
> +
> +		bb.note("adding hicolor-icon-theme dependency to %s" % pkg)	
> +		rdepends = bb.data.getVar('RDEPENDS', d, 1)
> +		rdepends += "hicolor-icon-theme"
> +		bb.data.setVar('RDEPENDS', rdepends, d)
> +	
>   		bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
>   		
>   		postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
Merged into OE-Core

Thanks
	Sau!
Saul Wold - Aug. 5, 2011, 2:23 a.m.
On 08/01/2011 04:08 AM, Koen Kooi wrote:
> Tested with gnome-icon-theme and libsoup recipes on angstrom.
>
But you did not test it against anything in oe-core, it has broken the 
build for connman-gnome and oprofileui, which use this bbclass.

The oe-core gnome-icon-theme does not include this class.

Please correct this.

   Processing task-base-extended...
| error: Failed dependencies:
| 	hicolor-icon-theme is needed by tasks-0.19-r0.armv5te
| 	hicolor-icon-theme is needed by connman-gnome-0.5-r6.armv5te
| 	hicolor-icon-theme is needed by 
oprofileui-server-0.0+git1+0c3c32fa754c1d0b70e65767ea7048914f776396-r4.armv5te

Thanks
	Sau!


> Signed-off-by: Koen Kooi<koen@openembedded.org>
> ---
>   meta/classes/gtk-icon-cache.bbclass |    8 ++++++--
>   1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
> index dcabaf5..d9b5d1b 100644
> --- a/meta/classes/gtk-icon-cache.bbclass
> +++ b/meta/classes/gtk-icon-cache.bbclass
> @@ -1,5 +1,4 @@
>   FILES_${PN} += "${datadir}/icons/hicolor"
> -RDEPENDS += "hicolor-icon-theme"
>
>   # This could run on the host as icon cache files are architecture independent,
>   # but there is no gtk-update-icon-cache built natively.
> @@ -34,7 +33,12 @@ python populate_packages_append () {
>   		icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, bb.data.getVar('datadir', d, 1))
>   		if not os.path.exists(icon_dir):
>   			continue
> -		
> +
> +		bb.note("adding hicolor-icon-theme dependency to %s" % pkg)	
> +		rdepends = bb.data.getVar('RDEPENDS', d, 1)
> +		rdepends += "hicolor-icon-theme"
> +		bb.data.setVar('RDEPENDS', rdepends, d)
> +	
>   		bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
>   		
>   		postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
Koen Kooi - Aug. 5, 2011, 5:28 a.m.
Op 5 aug. 2011, om 04:23 heeft Saul Wold het volgende geschreven:

> On 08/01/2011 04:08 AM, Koen Kooi wrote:
>> Tested with gnome-icon-theme and libsoup recipes on angstrom.
>> 
> But you did not test it against anything in oe-core, it has broken the build for connman-gnome and oprofileui, which use this bbclass.
> 
> The oe-core gnome-icon-theme does not include this class.
> 
> Please correct this.
> 
>  Processing task-base-extended...
> | error: Failed dependencies:
> | 	hicolor-icon-theme is needed by tasks-0.19-r0.armv5te
> | 	hicolor-icon-theme is needed by connman-gnome-0.5-r6.armv5te
> | 	hicolor-icon-theme is needed by oprofileui-server-0.0+git1+0c3c32fa754c1d0b70e65767ea7048914f776396-r4.armv5te

So you found broken metadata. If tasks, connman-gnome and oprofileui-server need hicolor-icon-theme, they should list it in their RDEPENDS_${PN}. That is a seperate issue than what I fixed in the bbclass
Saul Wold - Aug. 5, 2011, 5:32 a.m.
On 08/04/2011 10:28 PM, Koen Kooi wrote:
>
> Op 5 aug. 2011, om 04:23 heeft Saul Wold het volgende geschreven:
>
>> On 08/01/2011 04:08 AM, Koen Kooi wrote:
>>> Tested with gnome-icon-theme and libsoup recipes on angstrom.
>>>
>> But you did not test it against anything in oe-core, it has broken the build for connman-gnome and oprofileui, which use this bbclass.
>>
>> The oe-core gnome-icon-theme does not include this class.
>>
>> Please correct this.
>>
>>   Processing task-base-extended...
>> | error: Failed dependencies:
>> | 	hicolor-icon-theme is needed by tasks-0.19-r0.armv5te
>> | 	hicolor-icon-theme is needed by connman-gnome-0.5-r6.armv5te
>> | 	hicolor-icon-theme is needed by oprofileui-server-0.0+git1+0c3c32fa754c1d0b70e65767ea7048914f776396-r4.armv5te
>
> So you found broken metadata. If tasks, connman-gnome and oprofileui-server need hicolor-icon-theme, they should list it in their RDEPENDS_${PN}. That is a seperate issue than what I fixed in the bbclass

Koen, the gtk-icon-cache.bbclass did contain that RDEPENDS, which you 
removed, if you are going to modify bbclasses, you need to ensure that 
the recipes using them still work correctly.  Your fix broke others, 
please take the time to test against oe-core also.

(and yes we have all made changes that break other distros, there's no 
way test all, but this broke oe-core).

I look forward to a fix.

Thanks

Sau!

Patch

diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index dcabaf5..d9b5d1b 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,5 +1,4 @@ 
 FILES_${PN} += "${datadir}/icons/hicolor"
-RDEPENDS += "hicolor-icon-theme"
 
 # This could run on the host as icon cache files are architecture independent,
 # but there is no gtk-update-icon-cache built natively.
@@ -34,7 +33,12 @@  python populate_packages_append () {
 		icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, bb.data.getVar('datadir', d, 1))
 		if not os.path.exists(icon_dir):
 			continue
-		
+
+		bb.note("adding hicolor-icon-theme dependency to %s" % pkg)	
+		rdepends = bb.data.getVar('RDEPENDS', d, 1)
+		rdepends += "hicolor-icon-theme"
+		bb.data.setVar('RDEPENDS', rdepends, d)
+	
 		bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
 		
 		postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)