Bug 146560

Summary: %post - Failed to write cache file: Not a directory
Product: [Fedora] Fedora Reporter: John Ellson <john.ellson>
Component: redhat-artworkAssignee: John (J5) Palmieri <johnp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jkeck, mclasen, michal
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: 2005-03-07 05:10:36 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 John Ellson 2005-01-29 17:09:49 UTC
Description of problem:
rpm -Uvh redhat-artwork-0.120-4.x86_64.rpm
reports Failed to write cache file: Not a directory from %post

Running under strace shows:
    "for dir in /usr/share/icons/*; d"...
which clearly picks up files as well as directories

Version-Release number of selected component (if applicable):
redhat-artwork-0.120-4.x86_64.rpm

How reproducible:
100%

Steps to Reproduce:
1. rpm -Uvh --replacepkgs redhat-artwork-0.120-4.x86_64.rpm
2.
3.
  
Actual results:
Preparing...               
########################################### [100%]
   1:redhat-artwork        
########################################### [100%]
Failed to write cache file: Not a directory
Failed to write cache file: Not a directory
error: %post(redhat-artwork-0.120-4.x86_64) scriptlet failed, exit
status 1


Expected results:
no errors from rpm upgrade

Additional info:

Comment 1 Michal Jaegermann 2005-01-30 00:41:41 UTC
The script is buggy because it blindly assumes that everything
found in /usr/share/icons/ is a directory.  This is not true and
actually there is no way to guarantee that ever.

A slight modification:

for dir in /usr/share/icons/*; do
   [ -d "$dir" ] || continue
  /usr/bin/gtk-update-icon-cache "$dir"
done

makes that script to run correctly although this leaves uncached
files directly in /usr/share/icons/, I guess.  Are there any
problems with running simply
 
   /usr/bin/gtk-update-icon-cache /usr/share/icons

The same buggy script is used also in packages gnome-themes and
gnome-icon-theme.  Should bugs be filed agaist these too or here
is good enough?


Comment 2 Alexander Larsson 2005-01-31 12:43:13 UTC
Please file bugs against them too.


Comment 3 Michal Jaegermann 2005-01-31 16:33:09 UTC
Bug #146661 notes the the same problem for gnome-themes package and
for gnome-icon-theme bug #146496 was filed.