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:
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.
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.
(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
I changed the description without any functionality change.
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.