2008/1/11, Aaron Griffin <aaronmgriffin@gmail.com>:
On Jan 11, 2008 12:28 PM, Eric Belanger <belanger@astro.umontreal.ca> wrote:
On Fri, 11 Jan 2008, Xavier wrote:
Dan McGee wrote:
We are not using a crazy config file. It is basically ini format, which is quite standard, and I don't know a better way to go. All I can say is adding a comment saying "# don't be a bonehead and UNCOMMENT the [repo] headers!" or something.
Right, maybe a little comment would be enough.
Maybe also having the comment before the [repo] line instead of after it would help users noticing the [repo] header better.
I always figured this was the reason for it. We have something like:
#[foobar] #this is the foobar crap #Include= /foo/bar
Additionally, I was laughingly explaining the PEBKAC to a coworker, and he said the following: "If it's ini style, it shouldn't really hurt to have empty sections. Why not simply leave the headings uncommented", which might also work.
Insert toast into slot
IMO allowing empty sections is not a good idea. I can have many entries like: [repo] # Server = lalala # Include = lalala Server = lalala # Server = lalala It's much easier to distinguish which repo is enabled by looking if [repo] is uncommented, instead of looking if there is at least one Server/Include uncommented. We cannot make everything foolproof. The current scheme is fine as it is. It's better to let people complain about "errors" and be corrected then, than allowing them to use bad style and allowing them to rely on foolproofness of the system. -- Roman Kyrylych (Роман Кирилич)