Patchwork [RFC,6/7] sato-icon-theme: make use of the gtk-icon-cache postinst scriptlet

login
register
mail settings
Submitter Laurentiu Palcu
Date Sept. 19, 2012, 11:49 a.m.
Message ID <854e4261283991cdc56f176c6f97dee9acf718fd.1348052899.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/36911/
State New
Headers show

Comments

Laurentiu Palcu - Sept. 19, 2012, 11:49 a.m.
This patch is for reusing the postint scriptlet of the
gtk-icon-cache.bbclass.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 .../sato-icon-theme/sato-icon-theme.inc            |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
Ross Burton - Sept. 19, 2012, 1:36 p.m.
On 19 September 2012 12:49, Laurentiu Palcu <laurentiu.palcu@intel.com> wrote:
>  SECTION = "x11"
> -DEPENDS = ""
> +DEPENDS = "gtk+-native"

This recipe doesn't directly need gtk+-native, the class does and that
already adds gtk+-native to the dependencies.

Ross
Laurentiu Palcu - Sept. 19, 2012, 3:30 p.m.
On 09/19/2012 04:36 PM, Burton, Ross wrote:
> On 19 September 2012 12:49, Laurentiu Palcu <laurentiu.palcu@intel.com> wrote:
>>  SECTION = "x11"
>> -DEPENDS = ""
>> +DEPENDS = "gtk+-native"
> 
> This recipe doesn't directly need gtk+-native, the class does and that
> already adds gtk+-native to the dependencies.
Didn't notice that... Thanks for spotting it.

Laurentiu
> 
> Ross
>

Patch

diff --git a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
index 9fd1012..3017e11 100644
--- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
+++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
@@ -6,7 +6,7 @@  LICENSE = "CC-BY-SA-3.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=56a830bbe6e4697fe6cbbae01bb7c2b2"
 
 SECTION = "x11"
-DEPENDS = ""
+DEPENDS = "gtk+-native"
 
 inherit autotools pkgconfig allarch
 
@@ -14,12 +14,13 @@  FILES_${PN} += "${datadir}"
 
 EXTRA_OECONF += "--with-iconmap=${STAGING_LIBDIR_NATIVE}/../libexec/icon-name-mapping"
 
+inherit gtk-icon-cache
+
 #explictly setting "Sato" as default icon theme to avoid icon missing due to
 #tricky race condition
 pkg_postinst_${PN} () {
-        if [ "x$D" != "x" ]; then
-                exit 1
-        fi
-        gtk-update-icon-cache -q /usr/share/icons/Sato
-        echo 'gtk-icon-theme-name = "Sato"' >> /etc/gtk-2.0/gtkrc
+	if [ ! -d $D/etc/gtk-2.0 ]; then
+		mkdir $D/etc/gtk-2.0
+	fi
+	echo 'gtk-icon-theme-name = "Sato"' >> $D/etc/gtk-2.0/gtkrc
 }