Bug 118890 - (xorg-scriptlet) xorg-x11-libs uninstall: "line 10: syntax error near unexpected token `fi'"
xorg-x11-libs uninstall: "line 10: syntax error near unexpected token `fi'"
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
: 118949 119163 119187 119188 119189 (view as bug list)
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
 
Reported: 2004-03-22 09:26 EST by Barry K. Nathan
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-23 17:48:51 EST
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 Barry K. Nathan 2004-03-22 09:26:00 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040225 Firefox/0.8

Description of problem:
When uninstalling xorg-x11-libs, I get this error message:

/var/tmp/rpm-tmp.27030: line 10: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.27030: line 10: `  fi'
error: %postun(xorg-x11-libs-0.0.6.6-0.0.2004_03_11.6) scriptlet
failed, exit status 2

I didn't try to reproduce this bug, but there's a completely obvious
error in the postun script. Look at this code:

%postun libs
{
  if [ "$1" = "0" ]; then
    # Do not remove _x11libdir from ld.so.conf in postun, as it can cause
    # serious upgrade problems, especially if the package name changes, or
    # is replaced with an alternate implementation of X11
    #grep -v "^%{_x11libdir}$" /etc/ld.so.conf > /etc/ld.so.conf.new
    # preserve permissions
    #cat /etc/ld.so.conf.new > /etc/ld.so.conf
    #rm -f /etc/ld.so.conf.new
  fi
  /sbin/ldconfig
}

Take out the comments and it becomes:

%postun libs
{
  if [ "$1" = "0" ]; then
  fi
  /sbin/ldconfig
}

which is not legal bash syntax. Assuming you really want to keep the
code commented out for now, the fix is to comment out the "if" and
"fi" as well.

Version-Release number of selected component (if applicable):
xorg-x11-libs-0.0.6.6-0.0.2004_03_11.6
Comment 1 Mike A. Harris 2004-03-22 22:05:13 EST
*** Bug 118949 has been marked as a duplicate of this bug. ***
Comment 2 Mike A. Harris 2004-03-22 22:05:45 EST
Whoops, I should have spotted that.  Thanks for reporting, now fixed
in CVS and will be in the next build (.7)

* Mon Mar 22 2004 Mike A. Harris <mharris@redhat.com>
- Fixed -libs subpackage script to not have broken empty if block
(#118949)
Comment 3 Mike A. Harris 2004-03-23 17:48:51 EST
This is in dist-fc2 internally now.  Closing as "RAWHIDE".

Thanks again for the report.
Comment 4 Mike A. Harris 2004-03-25 15:36:21 EST
*** Bug 119163 has been marked as a duplicate of this bug. ***
Comment 5 Mike A. Harris 2004-03-25 15:41:05 EST
Just a note to others who are experiencing this problem:

This is a bug in the %postun script of the
xorg-x11-libs-0.0.6.6-0.0.2004_03_11.6 package only, which is fixed
in newer builds.  If you do have the .6 package installed, when you
upgrade to a newer package, the %postun from the .6 package gets
executed, and you WILL see this error even though the bug IS fixed
in the newer packages.

This is because it is the _old_ .6 %postun which has the bug in it
is what gets executed when the .6 package is removed, thus
triggering the bug.

Therefore, even though the bug _is_ fixed, people will continue
to see the bug, until nobody is using the .6 package anymore.

There is no automated way to prevent this error from being seen
on package upgrades, and no way to prevent it via fixes in the
new packages.

It should just be treated as a harmless warning/error for a 
one time package upgrade.

Hope this helps.
Comment 6 Mike A. Harris 2004-03-26 01:41:36 EST
*** Bug 119187 has been marked as a duplicate of this bug. ***
Comment 7 Mike A. Harris 2004-03-26 01:41:55 EST
*** Bug 119188 has been marked as a duplicate of this bug. ***
Comment 8 Mike A. Harris 2004-03-26 01:42:14 EST
*** Bug 119189 has been marked as a duplicate of this bug. ***
Comment 9 Mike A. Harris 2004-03-26 01:44:08 EST
Assigning the bug alias "xorg-scriptlet" to this issue for ease
of closing duplicates which are flooding in.  Please close any
new duplicates as dupes of this bug.

TIA

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