Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167312 - x11-misc/mkxf86config overwrites config, no backups
Summary: x11-misc/mkxf86config overwrites config, no backups
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-17 10:03 UTC by Daniel Herzog
Modified: 2007-02-19 17:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Herzog 2007-02-17 10:03:35 UTC
I kind of just freaked out when i realized that running "mkxf86config.sh" killed my old configuration without asking any questions and without even backing it up.

It should be at least default to save a backup of the file like it was before, better of course to save them all appending integers or whatever.

Even worse, the new config doesnt work :-)

This bug is 'critical' since i lost data.

Reproducible: Always

Steps to Reproduce:
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2007-02-17 15:11:20 UTC
This is meant to be used on a LiveCD, where there is no meaningful previous config. What do you expect? If you're using it on a normal system, you're asking for trouble. Use 'X -configure' instead.
Comment 2 Daniel Herzog 2007-02-17 15:18:04 UTC
Well, it could just copy the original file to xorg.conf.bak or so.
And besides, the ebuild could have had a warning.
As well as a note that it is only intendet to be used on the livecds.
"xorg-x11 configuration builder for Gentoo" contains neither of this information.
Actually, i found out that sax2 is GPLed by now and searched for reasons to make it (not) available for gentoo, pros and cons.
i came across mkxf86config by searching the tree and it has exactly the same purpose, thus tested it.

How should i have known it overwrites anything - it could also have been a gentooish, enhanced version of xorgconfig or whatever else.
Comment 3 Daniel Herzog 2007-02-17 15:25:58 UTC
(sorry for double posting)
or - to avoid overwriting anything without making it strictly interactive, one could let it wait for 5 seconds like "emerge -C foo" does...there is a virtually endless list of possibilities.
it might also be good to let it fail if "-h" or "--help" are given, which is not that unusual to be tried out...

one could also make a --no-backup switch and let it backup files to .bak.000, 001, 002, ... if it is not given, plus add this switch to the init-script to avoid having a backup file in the livecd-fs
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2007-02-19 15:47:18 UTC
I changed the description without any functionality change.
Comment 5 Daniel Herzog 2007-02-19 17:54:36 UTC
To me this solution is okay.

Anyway, reading the CVS comment arises the question wether you 'dont run shell scripts blindly'?
Well - I still think there shouldnt be something in the tree that blindly overwrites existing configs without warning the user in some form (I see "used only on LiveCD" aka "dont run this on your desktop" as a warning.).

I doubt that anyone ever reads all the shell scripts portage installs, as it is not making any sense as long as you dont read all the source code being compile also.

Btw, a quick search for *.sh files which are shell scripts (according to 'file') found 136 files with +12k lines...

Sincerely.