Bug 133485

Summary: Lots of code duplication in different scripts in xinitrc package
Product: [Fedora] Fedora Reporter: Mike A. Harris <mharris>
Component: xinitrcAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: k.georgiou
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-10-05 11:43:27 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: 123268    

Description Mike A. Harris 2004-09-24 12:34:22 UTC
The "Xsession" and "xinitrc" scripts in the xinitrc package
share a lot of identical shell scripting snippits.  This is very
bad because bugs have to be fixed in multiple locations as they
are discovered, and there's lots of room for human error in keeping
them synchronized.

Querying bugzilla for all xinitrc bugs, shows that this has caused
a number of problems in the past also, which confirms my theory,
in addition to the obvious common sense of not having code
duplication.

We should fix this by either merging common code into a single
script which gets called by both scripts, or by turning both
scripts into a single dual-purpose script.  Both have advantages
that I can think of.

I'm logging this here for now, as I'm not going to fix this
immediately, but do not want to forget about it.

Comment 2 Mike A. Harris 2004-10-05 09:47:04 UTC
I've factored out the common code from Xsession and xinitrc into
a new script 'xinitrc-common' which is sourced from both.  In the
process I cleaned up the code, and made sure any bug fixes from
either of the originals were merged into the new common code.

This will be present in build xinitrc-4.0.8-1 in rawhide soon.


Comment 3 Mike A. Harris 2004-10-05 11:43:27 UTC
xinitrc-4.0.9-1 in rawhide contains the newly factored out script