Patchwork [03/10] sato-icon-theme: Explictly use "Sato" as gtk icon theme

login
register
mail settings
Submitter Saul Wold
Date March 3, 2011, 10:49 p.m.
Message ID <732c81e35c4936d54c7fb495420cbb5c67c474ba.1299192495.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/1113/
State Superseded
Headers show

Comments

Saul Wold - March 3, 2011, 10:49 p.m.
From: Zhai Edwin <edwin.zhai@intel.com>

There is a tricky race condition that "Sato" icons got missing on
matchbox-desktop as low priority "hicolor" theme was chosen. Explictly
settting "Sato" in gtk config file to avoid this.

[BUGID #456] got fixed.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
---
 .../sato-icon-theme/sato-icon-theme.inc            |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Richard Purdie - March 3, 2011, 11:24 p.m.
On Thu, 2011-03-03 at 14:49 -0800, Saul Wold wrote:
> From: Zhai Edwin <edwin.zhai@intel.com>
> 
> There is a tricky race condition that "Sato" icons got missing on
> matchbox-desktop as low priority "hicolor" theme was chosen. Explictly
> settting "Sato" in gtk config file to avoid this.
> 
> [BUGID #456] got fixed.
> 
> Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
> ---
>  .../sato-icon-theme/sato-icon-theme.inc            |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> 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 a1669c6..0eff9dd 100644
> --- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> +++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> @@ -16,9 +16,12 @@ PACKAGE_ARCH = "all"
>  
>  EXTRA_OECONF += "--with-iconmap=${STAGING_LIBDIR_NATIVE}/../libexec/icon-name-mapping"
>  
> +#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
>  }

I've deliberately merged the previous version of this patch as this one
wipes out any contents of the file! I can live with duplicate lines for
now.

I'd like the bug to remain open on this one as this is a workaround, not
a proper fix for the problem. It can change priority/target milestone
though.

Cheers,

Richard
Zhai, Edwin - March 4, 2011, 1:05 a.m.
Richard Purdie wrote:
>
>
> > --- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> > +++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> > @@ -16,9 +16,12 @@ PACKAGE_ARCH = "all"
> > 
> >  EXTRA_OECONF += 
> "--with-iconmap=${STAGING_LIBDIR_NATIVE}/../libexec/icon-name-mapping"
> > 
> > +#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
> >  }
>
> I've deliberately merged the previous version of this patch as this one
> wipes out any contents of the file! I can live with duplicate lines for
> now.
>
> I'd like the bug to remain open on this one as this is a workaround, not
> a proper fix for the problem. It can change priority/target milestone
> though.
>

Agree.  We can revisit it in future. It is very hard for reproducing and 
debugging.
 
>
> Cheers,
>
> Richard
>

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 a1669c6..0eff9dd 100644
--- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
+++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
@@ -16,9 +16,12 @@  PACKAGE_ARCH = "all"
 
 EXTRA_OECONF += "--with-iconmap=${STAGING_LIBDIR_NATIVE}/../libexec/icon-name-mapping"
 
+#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
 }