Bug 478721

Summary: escape uses gtk-update-icon-cache in its post(un)install scripts without handling the case where gtk2 isn't installed
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: escapeAssignee: Adam Goode <adam>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: adam, pahan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-04 06:13:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Wolff III 2009-01-04 05:11:49 UTC
Description of problem:
The post install script for escape can fail when either gtk2 isn't installed or if it is being installed in the same transaction, but escape ends up being installed first.

Version-Release number of selected component (if applicable):
escape-200704130-9.fc10.i386.rpm

How reproducible:
Probably less than 100%, but shouldn't be too hard.

Steps to Reproduce:
1. Run livecd-creator on the games spin
2.
3.
  
Actual results:
  Installing: escape                       ################### [ 695/1260]
/var/tmp/rpm-tmp.t2tgkb: line 2: /usr/bin/gtk-update-icon-cache: No such file or directory

Expected results:
No error message.

Additional info:
The post(un)install scripts:
bash-3.2$ rpm -q --scripts escape
postinstall scriptlet (using /bin/sh):
touch --no-create /usr/share/icons/hicolor || :
/usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor || :
postuninstall scriptlet (using /bin/sh):
touch --no-create /usr/share/icons/hicolor || :
/usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor || :

I have been told the normal idiom for this kind of thing is:
touch --no-create /usr/share/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor || :
fi

Comment 1 Adam Goode 2009-01-04 06:13:53 UTC
I've fixed it in rawhide, but I won't bother releasing updates for F9 and F10 since the message is annoying but harmless. If you disagree, please reopen this bug. :)

Comment 2 Bruno Wolff III 2009-01-04 06:32:16 UTC
Rawhide is fine. I am trying to get livecd-creator to build a games spin for F11 and the script errors worried me a bit. But I do think you are right about the post install scripts failing with an error message isn't really different than failing silently in theory. In practice it might generate questions from people trying to use customized versions of the game spin kickstart file down the road. So getting it fixed is nice. Thanks.

Comment 3 Bruno Wolff III 2009-01-11 04:02:16 UTC
I am just confirming that I am no longer seeing the error message in rawhide livecd-creator runs. Thanks.