On Jun 5, 2010, at 11:39 AM, Wayne Davison wrote: > Here's something that was recently fixed for the popt that is included > with rsync: rejecting an arg to an option that doesn't take an arg. > > Attached is a patch. A new error code, POPT_ERROR_UNWANTEDARG, was > created to make the error message nice. This handles both -l=value > and --long-arg=value where neither one is supposed to take a value. >
Hmm, so --foo=bar returns POPT_ERROR_UNWANTEDARG but --foo bar returns bar in the argument list? The other way to "fix" the error is to morph "--foo=bar" behavior to be identical to "--foo bar", i.e. an extra argument failure. Lemme muddle a bit about whether the two forms should be treated differently or identically, that's purely a design issue. Both cases are an error no matter what. There's nothing wrong with your patch whatsoever, just that it introduces instant legacy incompatibility. *shrug* Thanks for the patch. (aside) Anything you want to see in POPT 2.0? I'm collecting features ... 73 de Jeff ______________________________________________________________________ POPT Library http://rpm5.org Developer Communication List popt-devel@rpm5.org