Bug 133485 - Lots of code duplication in different scripts in xinitrc package
Lots of code duplication in different scripts in xinitrc package
Product: Fedora
Classification: Fedora
Component: xinitrc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
Depends On:
Blocks: FC3Target
  Show dependency treegraph
Reported: 2004-09-24 08:34 EDT by Mike A. Harris
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-05 07:43:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike A. Harris 2004-09-24 08:34:22 EDT
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

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 05:47:04 EDT
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 07:43:27 EDT
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.