Bug 1013989

Summary: ibus-rawcode needs to have ibus write-cache --system in %post and %postun
Product: [Fedora] Fedora Reporter: fujiwara <tfujiwar>
Component: ibus-rawcodeAssignee: Pravin Satpute <psatpute>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: i18n-bugs, psatpute, shawn.p.huang, tfujiwar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ibus-rawcode-1.3.2-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 06:41:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description fujiwara 2013-10-01 08:23:01 UTC
ibus 1.5.3 or later supports the system cache besides the user cache and the system cache can reduce the launching time of ibus-daemon when the users log into the desktop session initially.

I'd ask the engines to have 'ibus write-cache --system' in their %post and %postun if the engines are installed by default comps.

Please refer the %post and %postun in ibus-anthy:
http://pkgs.fedoraproject.org/cgit/ibus-anthy.git/tree/ibus-anthy.spec#n105

Comment 1 Pravin Satpute 2013-10-04 08:27:41 UTC
Sure. Below patch is sufficient, right?

*******************
%post
/sbin/ldconfig
# recreate icon cache
touch --no-create %{_datadir}/icons/hicolor || :
[ -x %{_bindir}/gtk-update-icon-cache ] && \
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
[ -x %{_bindir}/ibus ] && \
  %{_bindir}/ibus write-cache --system &>/dev/null || :

%postun
/sbin/ldconfig
# recreate icon cache
touch --no-create %{_datadir}/icons/hicolor || :
[ -x %{_bindir}/gtk-update-icon-cache ] && \
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
[ -x %{_bindir}/ibus ] && \
  %{_bindir}/ibus write-cache --system &>/dev/null || :
************************

Comment 2 fujiwara 2013-10-04 09:09:36 UTC
(In reply to Pravin Satpute from comment #1)
> %post
> /sbin/ldconfig
> # recreate icon cache
> touch --no-create %{_datadir}/icons/hicolor || :
> [ -x %{_bindir}/gtk-update-icon-cache ] && \
>   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

I think ibus-rawcode does not have to run gtk-update-icon-cache because ibus-rawcode.png exists in /usr/share/ibus-rawcode/icons but not /usr/share/icons .

> [ -x %{_bindir}/ibus ] && \
>   %{_bindir}/ibus write-cache --system &>/dev/null || :

Yes, I'd ask this line only.

> 
> %postun
> /sbin/ldconfig
> # recreate icon cache
> touch --no-create %{_datadir}/icons/hicolor || :
> [ -x %{_bindir}/gtk-update-icon-cache ] && \
>   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

I think ibus-rawcode does not have to run gtk-update-icon-cache because ibus-rawcode.png exists in /usr/share/ibus-rawcode/icons but not /usr/share/icons .



> [ -x %{_bindir}/ibus ] && \
>   %{_bindir}/ibus write-cache --system &>/dev/null || :

Yes, I'd ask this line only.

Also please add 'Require: ibus >= 1.5.3' in ibus-rawcode.spec for 'ibus write-cache'.

Comment 3 Fedora Update System 2013-10-07 06:54:43 UTC
ibus-rawcode-1.3.2-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-rawcode-1.3.2-3.fc20

Comment 4 Fedora Update System 2013-10-07 15:46:52 UTC
Package ibus-rawcode-1.3.2-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ibus-rawcode-1.3.2-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18472/ibus-rawcode-1.3.2-3.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-11-10 06:41:25 UTC
ibus-rawcode-1.3.2-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.