Bug 475927 - The post install and uninstall scripts use gtk-update-icon-cache without making sure its available
The post install and uninstall scripts use gtk-update-icon-cache without maki...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: freedroid (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-11 00:23 EST by Bruno Wolff III
Modified: 2009-07-01 16:14 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.0.2-10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-01 16:14:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruno Wolff III 2008-12-11 00:23:01 EST
Description of problem:
The spec file for freedroid doesn't require coreutils for the post install and post uninstall scripts. This can cause problems during fresh installs or when build live cds.
You can include the following in the spec file to fix this:
Requires(post): coreutils
Requires(postun): coreutils

Version-Release number of selected component (if applicable):
freedroid-1.0.2-9.fc9.i386

How reproducible:
The error can be verified by examining the spec file. The symptoms can show up randomly based on install order.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Ville Skyttä 2008-12-11 13:51:02 EST
There's nothing in the package's %post and %postun that would use anything from coreutils as far as I can tell, so adding the dependencies would be wrong.
Comment 2 Bruno Wolff III 2008-12-11 16:22:55 EST
I did see an error for freedroid when running livecd-creator. I may have mixed up one of the reports as I was going through about a dozen. However there does seem to be an issue.
[bruno@cerberus ~]$ rpm -q --scripts freedroid
postinstall scriptlet (using /bin/sh):
gtk-update-icon-cache -qf /usr/share/icons/hicolor &>/dev/null || :
postuninstall scriptlet (using /bin/sh):
gtk-update-icon-cache -qf /usr/share/icons/hicolor &>/dev/null || :

gtk-update-icon-cache is provided by gtk2 which you dobn't have a requires for.
However what I was told is that one is supposed to test that gtk-update-icon-cache exists and skip the call if it doesn't. That way you don't need gtk2 installed. The idiom for doing this that was recommended to me was:
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
If you go this route then you need to do post and postun requires on coreutils.
I am not sure how I messed up the report. I was checking scripts, so I shouldn't have seen any coreutils dependency.
Comment 3 Bruno Wolff III 2008-12-12 00:44:57 EST
Now that I am back home, I found out how I got confused. It was freedroidrpg that used the touch command, rather than freedroid. So I need to file a bug against that package. However freedroid does seem to be doing something nonstandard with its scripts that could cause errors during fresh installs and livecd builds.
Comment 4 Ville Skyttä 2008-12-12 02:43:49 EST
If the "touch" is required for KDE, then indeed the scripts need some adjustments.  The GTK part is already functionally equivalent to the "recommended" approach.  I'll look into it.
Comment 5 Ville Skyttä 2009-07-01 16:14:25 EDT
The icon cache scriptlets are up to date with current packaging guidelines since 1.0.2-10 (F-11+ at the moment).

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