RPM Community Forums

Mailing List Message of <popt-devel>

Re: Disallowing args

From: Jeff Johnson <n3npq@mac.com>
Date: Sat 05 Jun 2010 - 17:56:41 CEST
Message-id: <C88275D9-3AEF-4ABD-BA60-A57BDF6F3703@mac.com>

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 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

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.

Anything you want to see in POPT 2.0? I'm collecting features ...

73 de Jeff
Received on Sat Jun 5 17:57:06 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.