Recent kerberos refactoring

Alexander Bokovoy ab at
Thu Apr 12 08:02:17 MDT 2012

Hi Jelmer,

On Thu, Apr 12, 2012 at 16:54, Jelmer Vernooij <jelmer at> wrote:
> Hi Alexander, Andreas,
> This breaks the build against system Heimdal:
> charis:~/src/samba% make
> WAF_MAKE=1 ./buildtools/bin/waf build
> Waf: Entering directory `/home/jelmer/src/samba.git1/bin'
> Checking project rules ...
> Unknown dependency 'k5crypto' in 'addns'
This needs to be fixed, yes.

>> commit dda0531aae70e78e815fda8c594213369e76a847
>> Author: Alexander Bokovoy <ab at>
>> Date:   Tue Apr 3 11:22:15 2012 +0300
>>     WAF: Add support for stopping processing before end of wscript{_*}
>>     WAF scripts are written in Python and Python has no simple way
>>     to stop program execution other than using exceptions.
>>     This change adds WscriptCheckSkipped exception and its handling in
>>     core WAF code. When any of wscript{_*} throws WscriptCheckSkipped
>>     exception, WAF simply continues to process next wscript in queue
>>     rather than breaking build.
>>     WscriptCheckSkipped exception can be used to perform early bail out
>>     of configuration/build target checks if certain dependency is not available
>>     when the default checks are way more numerous than a check for this
>>     particular dependency. This is to avoid 'if ...' indenting for large
>>     blocks of existing code which also muddens git history for nothing.
>>     Signed-off-by: Andreas Schneider <asn at>
> Is this one really necessary? It doesn't actually seem to be used
> anywhere yet.
"yet" is the correct word. It is preparatory part for MIT krb5 reuse
but see below for reasoning.

> Wouldn't it make more sense to just conditionally add build files,
> rather than allowing the rest of them to be skipped halfway through? The
> nice thing about if statements is that it's fairly clear that something
> is conditional; having an exception being raised halfway through the
> file makes it unobvious what is going exactly without reading the file
> all the way from the beginning.
If you do conditionals, whole git history for those wscripts will be
overridden with formatting changes for nothing.
Practically, whole heimdal wscripts will have to be if-ed and I'm not
really ready for doing those indents just for such purpose.

Making an exception and properly catching it is way better. We can add
more verbose output telling why processing stopped and at which line.
/ Alexander Bokovoy

More information about the samba-technical mailing list