This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Multiple --site options


On 25/07/2011 19:44, szgyg wrote:
> On 7/22/2011 3:33 PM, Jon TURNEY wrote:
>> On 30/05/2011 10:28, szgyg wrote:
>>> I want to say `./setup.exe --site <ports> --site <local-repo>', so
>>> there it is.
>>
>> However, I think it needs a clearer description: What it actually does is
>> (i) add infrastructure for handling options which are repeated, and (ii)
>> correctly handle multiple --site, --pubkey and -sexpr-pubkey options.
> 
> 2011-07-25  SZAVAI Gyula <szgyg-Vx2QyAHHJOs5Z0SDYBDJZg@public.gmane.org>
> 
>     * libgetopt++/src/StringArrayOption.cc: New file.
>     Infrastructure for repeated string options.
>     * libgetopt++/include/getopt++/StringArrayOption.h: Ditto.
>     * libgetopt++/Makefile.am: Add new files.
>     * site.cc (SiteSetting::SiteSetting): Handle multiple --site
>     options.
>     * crypto.cc (verify_ini_file_sig): Handle multiple --pubkey and
>     --sexpr-pubkey options.
>     * package_meta.cc (packagemeta::isManuallyWanted): Handle
>     multiple --packages and --categories options.
> 
>> Would it make sense for the new StringArrayOption class derive from or
>> have members of type StringOption, rather than duplicating some of it?
> 
> We can move some common code from {Bool,StringArray,String}Option up to the
> Option class. I will be AFK in the next two weeks, after that I will send a
> follow-up patch.

Looking at this again, I withdrawn my comment on putting common code in the
Option class.  This patch matches the existing design of having no code in the
Option class.

So can we apply this? It's correct, and it works.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]