Bug 118890 (xorg-scriptlet) - xorg-x11-libs uninstall: "line 10: syntax error near unexpected token `fi'"
Summary: xorg-x11-libs uninstall: "line 10: syntax error near unexpected token `fi'"
Keywords:
Status: CLOSED RAWHIDE
Alias: xorg-scriptlet
Product: Fedora
Classification: Fedora
Component: xorg-x11
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
: 118949 119163 119187 119188 119189 (view as bug list)
Depends On:
Blocks: FC2Blocker
TreeView+ depends on / blocked
 
Reported: 2004-03-22 14:26 UTC by Barry K. Nathan
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-23 22:48:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Barry K. Nathan 2004-03-22 14:26:00 UTC
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-23 03:05:13 UTC
*** Bug 118949 has been marked as a duplicate of this bug. ***

Comment 2 Mike A. Harris 2004-03-23 03:05:45 UTC
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>
- Fixed -libs subpackage script to not have broken empty if block
(#118949)


Comment 3 Mike A. Harris 2004-03-23 22:48:51 UTC
This is in dist-fc2 internally now.  Closing as "RAWHIDE".

Thanks again for the report.

Comment 4 Mike A. Harris 2004-03-25 20:36:21 UTC
*** Bug 119163 has been marked as a duplicate of this bug. ***

Comment 5 Mike A. Harris 2004-03-25 20:41:05 UTC
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 06:41:36 UTC
*** Bug 119187 has been marked as a duplicate of this bug. ***

Comment 7 Mike A. Harris 2004-03-26 06:41:55 UTC
*** Bug 119188 has been marked as a duplicate of this bug. ***

Comment 8 Mike A. Harris 2004-03-26 06:42:14 UTC
*** Bug 119189 has been marked as a duplicate of this bug. ***

Comment 9 Mike A. Harris 2004-03-26 06:44:08 UTC
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.