Bug 122454

Summary: Make upgrade scripts remove Options "xkbrules" "xfree86" lines from config file.
Product: [Fedora] Fedora Reporter: Mike A. Harris <mharris>
Component: xorg-x11Assignee: Mike A. Harris <mharris>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jdennis, lohphat, mitr, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-12 19:57:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 114961    
Attachments:
Description Flags
xorg.spec.patch none

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.