Bug 181049 - fonts-chinese's postinstall has mistake(fonts-chinese-3.02-4.1)
fonts-chinese's postinstall has mistake(fonts-chinese-3.02-4.1)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: fonts-chinese (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Caius Chance
: EasyFix, i18n
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-12 06:51 EST by Miao ZhiCheng
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: 3.02-7.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-03 03:37:27 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)
proposed modified .spec file (6.47 KB, text/plain)
2006-09-06 00:58 EDT, Caius Chance
no flags Details

  None (edit)
Description Miao ZhiCheng 2006-02-12 06:51:07 EST
postinstall scriptlet (using /bin/sh):
{
        umask 133
        touch /usr/share/fonts/chinese/TrueType 2> /dev/null && {
                /usr/bin/ttmkfdir -d /usr/share/fonts/chinese/TrueType -o
/usr/share/fonts/chinese/TrueType/fonts.scale
            mkfontdir /usr/share/fonts/chinese/TrueType
                /usr/sbin/chkfontpath -q -a /usr/share/fonts/chinese/TrueType
        }

        touch /usr/share/fonts/chinese/misc 2> /dev/null && {
                /usr/bin/ttmkfdir -d /usr/share/fonts/chinese/misc -o
/usr/share/fonts/chinese/misc/fonts.scale
            mkfontdir /usr/share/fonts/chinese/TrueType
                /usr/sbin/chkfontpath -q -a /usr/share/fonts/chinese/misc
        }
        #Update fontconfig cache
        [  -x /usr/bin/fc-cache ] && /usr/bin/fc-cache 2> /dev/null
}


I think the second mkfontdir should be :
            mkfontdir /usr/share/fonts/chinese/misc
Comment 1 Caius Chance 2006-08-20 22:03:45 EDT
Sounds resaonable.

Modified and in progress of testing.
Comment 2 Jens Petersen 2006-08-20 22:11:05 EDT
I suggest rewriting the above as a for loop to avoid this kind of
potential problem repeating.
Comment 3 Caius Chance 2006-09-06 00:58:09 EDT
Created attachment 135620 [details]
proposed modified .spec file

Modified. Proposed after feedback lines during install on test machine:

+ umask 133
+ for tmpfontdir in /usr/share/fonts/chinese/TrueType
/usr/share/fonts/chinese/misc
+ touch /usr/share/fonts/chinese/TrueType
+ /usr/bin/ttmkfdir -d /usr/share/fonts/chinese/TrueType -o
/usr/share/fonts/chinese/TrueType/fonts.scale
+ mkfontdir /usr/share/fonts/chinese/TrueType
+ /usr/sbin/chkfontpath -q -a /usr/share/fonts/chinese/TrueType
+ for tmpfontdir in /usr/share/fonts/chinese/TrueType
/usr/share/fonts/chinese/misc
+ touch /usr/share/fonts/chinese/misc
+ /usr/bin/ttmkfdir -d /usr/share/fonts/chinese/misc -o
/usr/share/fonts/chinese/misc/fonts.scale
+ mkfontdir /usr/share/fonts/chinese/misc
+ /usr/sbin/chkfontpath -q -a /usr/share/fonts/chinese/misc
+ '[' -x /usr/bin/fc-cache ']'
+ /usr/bin/fc-cache
Comment 4 Caius Chance 2006-09-06 02:29:28 EDT
The following package has been built and pending for QC.

fonts-chinese-3.02-7.fc6

After QC passed, will backport to fc5.
Comment 5 Caius Chance 2007-05-03 03:37:27 EDT
Fixed in fonts-chinese-3.02-7.fc6, built and pushed.

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