[oe] [oe-commits] Jackie Huang : gdk-pixbuf: fix the postinstall script failure when no icon is installed

Andreas Müller schnitzeltony at googlemail.com
Thu Aug 16 21:58:50 UTC 2012


On Thu, Aug 16, 2012 at 11:17 PM, Andreas Müller
<schnitzeltony at googlemail.com> wrote:
> On Thu, Aug 16, 2012 at 5:06 PM, Huang, Jie (Jackie)
> <Jackie.Huang at windriver.com> wrote:
>>>
>>>On Thu, Aug 16, 2012 at 02:30:51PM +0000, Huang, Jie (Jackie) wrote:
>>>> >
>>>> >On Thu, Aug 16, 2012 at 12:33:08PM +0200, Martin Jansa wrote:
>>>> >> On Wed, Aug 15, 2012 at 01:32:02PM +0000, git at git.openembedded.org wrote:
>>>> >> > Module: openembedded-core.git
>>>> >> > Branch: master
>>>> >> > Commit: 1d4fbe4761d3d97e3c4b6e894719ee41b21559b2
>>>> >> > URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1d4fbe4761d3d97e3c4b6e894719ee41b21559b2
>>>> >> >
>>>> >> > Author: Jackie Huang <jackie.huang at windriver.com>
>>>> >> > Date:   Thu Aug  9 10:30:30 2012 +0800
>>>> >> >
>>>> >> > gdk-pixbuf: fix the postinstall script failure when no icon is installed
>>>> >> >
>>>> >> > If gtk+ is added to core-image-minimal, postinstall script failed on boot:
>>>> >> >
>>>> >> > Running postinst /etc/rpm-postinsts/104...
>>>> >> > gtk-update-icon-cache: No theme index file.
>>>> >> > ERROR: postinst /etc/rpm-postinsts/104 failed.
>>>> >> >
>>>> >> > This patch fixed the postinstall script to check for the icon
>>>> >> > file first and not run the gtk-update-icon-cache if no icon
>>>> >> > is installed.
>>>> >> >
>>>> >> > [YOCTO #2905]
>>>> >> >
>>>> >> > Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
>>>> >> > Signed-off-by: Saul Wold <sgw at linux.intel.com>
>>>> >>
>>>> >>
>>>> >> Even with this patch I get:
>>>> >> Configuring gdk-pixbuf-loader-png.
>>>> >> gtk-update-icon-cache: No theme index file.
>>>> >> Configuring gdk-pixbuf-loader-jpeg.
>>>> >> gtk-update-icon-cache: No theme index file.
>>>> >> Configuring gdk-pixbuf-loader-xpm.
>>>> >> gtk-update-icon-cache: No theme index file.
>>>> >> Configuring gdk-pixbuf-loader-gif.
>>>> >> gtk-update-icon-cache: No theme index file.
>>>> >> Collected errors:
>>>> >>  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst script
>>>> >>  * returned status 1.
>>>> >>  * opkg_configure: gdk-pixbuf-loader-png.postinst returned 1.
>>>> >>  * pkg_run_script: package "gdk-pixbuf-loader-jpeg" postinst script
>>>> >>  * returned status 1.
>>>> >>  * opkg_configure: gdk-pixbuf-loader-jpeg.postinst returned 1.
>>>> >>  * pkg_run_script: package "gdk-pixbuf-loader-xpm" postinst script
>>>> >>  * returned status 1.
>>>> >>  * opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1.
>>>> >>  * pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script
>>>> >>  * returned status 1.
>>>> >>  * opkg_configure: gdk-pixbuf-loader-gif.postinst returned 1.
>>>> >
>>>> >This problem is caused by
>>>> >openembedded-core/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bb
>>>> >which does not provide index.theme file
>>>> >
>>>>
>>>> Well, in my case, there is no icon installed so there is on ${datadir}/icons at all.
>>>
>>>So it's fine to break postinst for everyone else who has
>>
>> This fix is for the case when there is no icon/theme installed. When we found the bug,
>> the postinst was calling the gtk-update-icon-cache for the hicolor theme which is not installed.
>>
>>>xcursor-transparent-theme or are you going to fix that?
>>
>> For xcursor-transparent-theme not providing the index.theme file, yeah it's really a problem,
>> I can fix that, but maybe we should open another bug for it?
>>
>> Thanks,
>> Jackie
>>
>>>
>>>Thanks,
>>>
>>>>
>>>> Thanks,
>>>> Jackie
>>>>
>>>> >and commit message of this change should be something like
>>>> >gdk-pixbuf: call gtk-update-icon-cache for each subdir of ${datadir}/icons
>>>> >not
>>>> >gdk-pixbuf: fix the postinstall script failure when no icon is installed
>>>> >
>>>> >Cheers,
>>>> >
>>>> >> > -test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache  -q ${datadir}/icons/hicolor
>>>> >> > +if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then
>>>> >> > +    for icondir in /usr/share/icons/*; do
>>>> >> > +        if [ -d ${icondir} ]; then
>>>> >> > +            gtk-update-icon-cache -q ${icondir}
>>>> >> > +        fi
>>>> >> > +    done
>>>> >> > +fi
>>>> >> >  }
>>>> >> >
>>>> >> >  PACKAGES_DYNAMIC += "gdk-pixbuf-loader-*"
>>>> >> >
> For me to understand: Why does gdk-pixbuf need to update icon-cache?
>
Understood (no comments please). But another question: Couldn't the
parameter '-t' as used in gtk-icon-cache.bbclass help?

Andreas




More information about the Openembedded-devel mailing list