Bug 259041 - fonts-japanese %postun script is setup for a failure and it fails
fonts-japanese %postun script is setup for a failure and it fails
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: fonts-japanese (Show other bugs)
rawhide
All All
medium Severity high
: ---
: ---
Assigned To: Akira TAGOH
Fedora Extras Quality Assurance
: i18n
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-28 00:35 EDT by Michal Jaegermann
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-02 02:01:22 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 Michal Jaegermann 2007-08-28 00:35:08 EDT
Description of problem:

'rpm -q --scripts fonts-japanese' produces this:

postinstall scriptlet (using /bin/sh):
{
    umask 133
    [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache /usr/share/fonts
}
postuninstall scriptlet (using /bin/sh):
{
    umask 133
    [ "$1" = "0" -a -x /usr/bin/fc-cache ] && /usr/bin/fc-cache /usr/share/fonts
}

The problem is that when '"$1" = "0"' term fails then the whole thing
returns with an error code as '|| :' is not there.  Another failure will
happen if '[ -x /usr/bin/fc-cache ]' will not end up as "true".

Due to the above in updates one gets:

  Cleanup   : fonts-japanese               ######################### [4/4]
error: %postun(fonts-japanese-0.20061016-9.fc8.noarch) scriptlet failed, exit
status 1

resuliting in duplicates which have to be removed with
'rpm -e --noscripts ....' (and file conflicts if you will try
to upgrade to 0.20061016-10.fc8 while both 0.20061016-9.fc8
and 0.20061016-8.fc8 are still present).

Version-Release number of selected component (if applicable):
fonts-japanese-0.20061016-10.fc8 and earlier

How reproducible:
always
Comment 1 Jens Petersen 2007-08-28 01:11:15 EDT
Thanks for the report.

I basically reproduced this I think, but I still wonder understand
why the postun script started to fail now though.
Comment 2 Jens Petersen 2007-08-28 02:30:29 EDT
(In reply to comment #1)
> I still wonder understand why the postun script started to fail now though.

Nevermind reproduced easily with a test shellscript.

Thanks again for reporting this, Michal, and for the clear explanation.

I updated fonts-japanese and sazanami-fonts now to use the standard
fedora fonts scriptlets.  Of course we can't fix the broken %postun
in the older packages unfortunately...

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