[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapadd: which database to open



What kind of breakage are you afraid of slipping through? You'll know
if it's outside any of your suffixes, or if it spans two databases.
Though the latter only after the first has been modified.

I know that one could find a way to make it work most times and spit out
some error messages if it's wrong. Indeed I'm in favor of smarter
handling of command-line options if there's a single way to get it right.


But when implementing automagic one has to consider whether there could
be a significant amount of cases for which the user comes to the mailing
list asking silly questions because he don't understand the error
message. In this particular case I'd vote for forcing the user to learn
how to use -n or -b.

Opening the correct db based on entries present in the file seems fairly reasonable. I'd even consider re-opening different db's as necessary through the file if they include multiple suffixes, though that's more work.


As far as error messages, this removes the number of cases where someone would see a message, so it should help on the bad questions front. While delivering simple messages is good, it's rather silly to present errors when we can clearly identify what the user wants, the semantics are unambiguous, and there is a straightforward path to implementation.

Matthew Backes
Symas Corporation
mbackes@symas.com