Bug 122454 - Make upgrade scripts remove Options "xkbrules" "xfree86" lines from config file.
Summary: Make upgrade scripts remove Options "xkbrules" "xfree86" lines from config file.
Keywords:
Status: CLOSED ERRATA
Alias: None
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:
Depends On:
Blocks: FC2Blocker
TreeView+ depends on / blocked
 
Reported: 2004-05-04 18:15 UTC by Mike A. Harris
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-07-12 19:57:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
xorg.spec.patch (1.75 KB, patch)
2004-05-07 09:30 UTC, Warren Togami
no flags Details | Diff

Description Mike A. Harris 2004-05-04 18:15:37 UTC
Modify the rpm upgrade scripts to have the X.org config file
stripped of any xkbrules option lines so that people don't get
burned on upgrades.

Comment 1 Warren Togami 2004-05-07 03:59:09 UTC
I can implement this fairly easily, but is it too late to include in FC2?

Comment 2 Warren Togami 2004-05-07 09:30:49 UTC
Created attachment 100068 [details]
xorg.spec.patch

Comment 3 Mike A. Harris 2004-05-07 11:10:08 UTC
Thanks Warren..  patch looks good, with a few minor changes to
silence potential error situations, and force mv with -f, etc.

Should be in 6.7.0-2

Comment 4 Mike A. Harris 2004-05-07 11:46:32 UTC
While doing a logic review in my head to ensure the code does the
right thing (and it did seem to do so), I had a few extra neurons
kick in and visualized a simpler solution with slightly reversed
logic.  Here's the new method using a for loop:

  for configfile in XF86Config-4 XF86Config ; do
      if [ -r $configfile ]; then
          if [ -r xorg.conf]; then
              mv -f $configfile $configfile.obsoleted
          else
              mv -f $configfile xorg.conf
          fi
      fi
  done

If the -4 file exists and is readable, then if the xorg.conf file
exists the -4 file gets renamed to obsolete.  If xorg.conf doesn't
exist, the -4 gets renamed to xorg.conf.  Next time through the
loop it tries again with the non-4 file, which will follow same
logic.  End result should be that there is 0 or 1 xorg.conf, which
is the correct file we want, and any other old files are renamed
to obsolete.

The logic seems to work, but if anyone spots any errors scream loud
as we're getting close.


Comment 5 Darin May 2004-05-11 18:35:20 UTC
Please note another ommission in the conversion scripts:

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=121984#c3



Comment 6 Mike A. Harris 2004-07-12 19:57:07 UTC
Resolved in the latest FC2 errata.


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