RPM Community Forums

Mailing List Message of <popt-devel>

Re: Support for variable number of arguments in popt

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 07 Sep 2011 - 18:50:57 CEST
Message-id: <9A0ADB32-9D95-4C1B-983A-FCFA4B3E66C2@mac.com>

On Sep 7, 2011, at 12:41 PM, Jeff Johnson wrote:

> On Sep 7, 2011, at 12:30 PM, Wichmann, Mats D wrote:
>> there's some precedent (not a lot) for using a separator other than space 
>> for this purpose, often a comma since it happens to be neutral to the
>> shell.  as in:
>> --optionlist=foo,bar,baz
> Yup. A comma separated list is actually what POPT uses for its Bloom filter
> implementation, where a series of comma separated strings
> are parsed as keys into a set container for arbitrary opaque strings
> that can be used/testsed through a set membership mechanism.
> Implemented here
> 	#define POPT_ARG_BITSET         16U+14U /*!< arg ==> bit set *
> where arg is a comma separated set of strings.
> There really isn't any guidance on a "standard" compliant solution.

It wouldn't be impossibly hard to add
as an option modifier permitted into POPT_ARG_ARGV/POPT_ARG_BITSET
and just add a split sloop for strings passed to those options.

todo++  but likely months before releasing POPT with POPT_ARGFLAG_COMMALIST,
and years before any distro bothers to upgrade POPT, judging from
RHEL6's and Fedora's "Fork y'all!" insistence to never use any
code I've touched (both RHEL6/Fedora continute with popt-1.13
years after release.)

73 de Je
Received on Wed Sep 7 18:51:06 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.