On Sun, Oct 12, 2008 at 08:29:28PM -0500, Shawn Walker wrote:

>> How's this:
>>
>>     pkg.depotd --content-root --mirror
>>
>> Does that set the value of content-root to "--mirror", or does it set the
>> value of content-root to be the built-in default?
>
> The latter thanks to long options parsing (I wish it would force --blah=foo 
> as the syntax).
>
> With the long-options parsing, it apparently sees --mirror *as* the value 
> to --content-root.

I'm confused.  Did those two sentences directly contradict each other?

> Which means I am unable to tell the difference between this:
>
> ./depot.py --content-root --mirror
>
> ...and this:
>
> ./depot.py --content-root /foo
>
> ...except that I throw an error if the directory doesn't exist during 
> startup.

... which is "--mirror" in the first example, and "/foo" in the second?

> Well, here's the ugly and uglier:
>
> ./depot.py ... --content-root
>
> ...will cause getopt to raise an error about it requiring an argument.

Right.  That's what it should be doing.

> ./depot.py ... --content-root=
>
> ...will cause getopt to return the arg but have it's value set as "". Which 
> leaves us to do something with it.

Sure.  Presumably you could do the same thing with

    ./depot.py ... --content-root ""

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to