Bug 207279 - %post script fails when directories don't exist, resulting in duplicate rpms installed
%post script fails when directories don't exist, resulting in duplicate rpms ...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ttmkfdir (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Liang Zhang
bzcl34nup
:
Depends On:
Blocks: FC6Blocker
  Show dependency treegraph
 
Reported: 2006-09-20 08:51 EDT by Karsten Hopp
Modified: 2015-04-06 23:06 EDT (History)
4 users (show)

See Also:
Fixed In Version: F7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-15 03:33:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Karsten Hopp 2006-09-20 08:51:24 EDT
Description of problem:
  Updating  : ttmkfdir                     ################### [ 116/1358]
ls: /usr/share/X11/fonts/100dpi: Datei oder Verzeichnis nicht gefunden
ls: /usr/share/X11/fonts/Type1: Datei oder Verzeichnis nicht gefunden
ls: /usr/X11R6/lib/X11/fonts/cyrillic: Datei oder Verzeichnis nicht gefunden
ls: /usr/X11R6/lib/X11/fonts/korean: Datei oder Verzeichnis nicht gefunden
ls: /usr/X11R6/lib/X11/fonts/OTF: Datei oder Verzeichnis nicht gefunden
ls: /usr/X11R6/lib/X11/fonts/TTF: Datei oder Verzeichnis nicht gefunden

rpm -q ttmkfdir:
ttmkfdir-3.0.9-20.2.1
ttmkfdir-3.0.9-20.3

Fix:
for dir in $(/usr/sbin/chkfontpath --list | sed -e
'/^Current/d;s#^[0-9]*:##g;s#:unscaled$##g;/^[[:space:]]*$/d' | sort | uniq) ;
do
    [ -d $dir ] && continue
    if ls $dir | grep -Eiqs '\.(ot[cf]|tt[cf])$';
    then
        touch $dir
    fi
done
Comment 1 Akira TAGOH 2006-09-25 22:04:59 EDT
You mean [ ! -d $dir ] && continue ??
Comment 2 Karsten Hopp 2006-09-26 05:08:08 EDT
;-(  You're more awake than I was when I wrote that. Thanks for catching that !
Comment 3 Liang Zhang 2006-09-26 21:41:31 EDT
for dir in $(/usr/sbin/chkfontpath --list | sed -e
'/^Current/d;s#^[0-9]*:##g;s#:unscaled$##g;/^[[:space:]]*$/d' | sort | uniq) ;
do
    [ ! -d $dir ] && continue
    if ls $dir | grep -Eiqs '\.(ot[cf]|tt[cf])$';
    then
        touch $dir
    fi
done

Is it OK?
Then I will modify ttmkfdir.spec.
Comment 4 Liang Zhang 2006-09-26 23:21:08 EDT
I modified it and committed it and built it in brew.
Comment 6 Bug Zapper 2008-04-03 14:16:02 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 7 Jens Petersen 2008-04-15 03:33:37 EDT
I am assuming this is fixed in current releases.

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