Bug 146560 - %post - Failed to write cache file: Not a directory
%post - Failed to write cache file: Not a directory
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: redhat-artwork (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-29 12:09 EST by John Ellson
Modified: 2013-03-13 00:47 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-07 00:10:36 EST
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 John Ellson 2005-01-29 12:09:49 EST
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-29 19:41:41 EST
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 07:43:13 EST
Please file bugs against them too.
Comment 3 Michal Jaegermann 2005-01-31 11:33:09 EST
Bug #146661 notes the the same problem for gnome-themes package and
for gnome-icon-theme bug #146496 was filed. 

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