Bug 176009 - Syntax error in xorg-x11-xfs postinstall script
Summary: Syntax error in xorg-x11-xfs postinstall script
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-xfs
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-17 10:39 UTC by Ville Skyttä
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 1.0.0-2
Clone Of:
Environment:
Last Closed: 2006-01-10 20:45:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2005-12-17 10:39:06 UTC
Upgrading xorg-x11-xfs to 1.0.0-1 outputs:

   syntax error at -e line 1, at EOF
   Execution of -e aborted due to compilation errors.

There seems to be at least one broken perl inline substitution, maybe instead of:

   perl -p -i -e '\#^.*/.*/Speedo.*#d' $XFSCONFIG

...you meant:

   perl -p -i -e 's#^.*/.*/Speedo.*\n##' $XFSCONFIG

...or:

   sed -i -e '\#^.*/.*/Speedo.*#d' $XFSCONFIG

Comment 1 Mike A. Harris 2005-12-21 12:36:07 UTC
Thanks for the report...

I noticed I used "sed -ie" in rpm scripts, which is nonportable to older
versions of sed.  That wont affect new OS installs, as the new OS comes
with a sed that is compatible with the -i option.  It should also at least
theoretically work also on OS upgrades done via anaconda, at least as long
as a compatible version of sed is installed prior to the script being
ran.  yum based upgrades from one OS release to the next however will not
work if the old OS release has a version of sed which does not support -i,
this will fail.

Doh!  I bet a lot of our packages now use sed -i too.  While there are
likely not many users who would perform such corner case upgrades, I
decided to use perl instead and avoid the issue altogether as perl has
to be installed on any modern OS install already anyway due to various
heavy usage of perl, plus other X scripts use it already.  Unfortunately,
I made a bad assumption that the sed syntax I had used would also work
with perl.  Should have tested that first I guess. ;o)

I'll fix that in the next xfs update, and test it this time too. :o)

Comment 2 Ville Skyttä 2005-12-21 16:28:44 UTC
I have personally nothing against perl, but mileages vary and some others might ;)

Anyway, in case you wish to use sed and the -i flag sometime, that functionality
is available in sed >= 3.95 which in terms of distro versions corresponds to RHL
>= 9 (and obviously all FC versions) and RHEL >= 3.

Comment 3 Bill Nottingham 2006-01-10 20:45:40 UTC
Fixed in 1.0.0-2, with the suggested perl correction above.


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