Bug 176009 - Syntax error in xorg-x11-xfs postinstall script
Syntax error in xorg-x11-xfs postinstall script
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-xfs (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-17 05:39 EST by Ville Skyttä
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 1.0.0-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-10 15:45:40 EST
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 Ville Skyttä 2005-12-17 05:39:06 EST
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 07:36:07 EST
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 11:28:44 EST
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 15:45:40 EST
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.