Bug 478721 - escape uses gtk-update-icon-cache in its post(un)install scripts without handling the case where gtk2 isn't installed
Summary: escape uses gtk-update-icon-cache in its post(un)install scripts without hand...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: escape
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Goode
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-04 05:11 UTC by Bruno Wolff III
Modified: 2009-01-11 04:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-04 06:13:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.