[Pki-devel] [PATCH] 35 Added option to build without Javadoc.

Endi Sukma Dewata edewata at redhat.com
Mon Mar 26 15:41:45 UTC 2012


On 3/23/2012 8:48 PM, Matthew Harmsen wrote:
> On 03/23/12 12:53, Endi Sukma Dewata wrote:
>> The build scripts have been modified to provide an option to build
>> without Javadoc to speed up development builds. The option can be
>> used as follows:
>>
>> compose_pki_core_packages --without-javadoc hybrid_rpms
>>
>> Ticket #111

> CONDITIONAL ACK with CAVEATS:
>
> The following invocations succeeded building the RPMS without building
> the javadoc RPMS (it should have failed with a Usage message):
>
>   * pki/scripts/compose_pki_core_packages *--w* hybrid_rpms
>   * pki/scripts/compose_pki_core_packages *--without* hybrid_rpms (note
>     that '*--without*' was used instead of '*--without-javadoc*')
>
> while the following invocations failed as expected and issued a Usage
> message:
>
>   * pki/scripts/compose_pki_core_packages *--foo* hybrid_rpms
>   * pki/scripts/compose_pki_core_packages *--without-foo* hybrid_rpms
>   * pki/scripts/compose_pki_core_packages *--without-javadocs*
>     hybrid_rpms (note that '*--without-javadocs*' (plural) was used
>     instead of '*--without-javadoc*')
>
> *Please feel free to check-in this patch once this issue has been
> corrected.*

It seems to be a feature of the getopt. According to getopt man page:

   Long options may be abbreviated, as long as the abbreviation is
   not ambiguous.

There's already a request to allow disabling abbreviation, but it won't 
be fixed:

   http://sourceware.org/bugzilla/show_bug.cgi?id=6863

I've tested adding another option (e.g. --without-test). If you specify 
an abbreviated option (e.g. --without) it will find the first defined 
option that matches it (e.g. --without-javadoc) even thought it could be 
considered ambiguous.

-- 
Endi S. Dewata




More information about the Pki-devel mailing list