Bug 133485 - Lots of code duplication in different scripts in xinitrc package
Summary: Lots of code duplication in different scripts in xinitrc package
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xinitrc
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
 
Reported: 2004-09-24 12:34 UTC by Mike A. Harris
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-05 11:43:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


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