Recent kerberos refactoring

Andrew Bartlett abartlet at
Thu Apr 12 15:37:15 MDT 2012

On Thu, 2012-04-12 at 17:02 +0300, Alexander Bokovoy wrote:
> 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.

One question:  Were these patches proposed somewhere that I wasn't aware
of?  I would have appreciated the chance to comment on some of these

> > 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.

If you have to if-ed the whole hiemdal wscript, then I think you are
doing something wrong.  We can already use a system Heimdal, and the
same logic to skip building those libs should be able to be used for

Additionally, the current patch to simply skip all of the heimdal_build
directory either shows that this isn't required, or is incorrect. 

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

I also would prefer to avoid the exceptions approach.  I'm less worried
about the history (splitting the files up may be an option so git sees a
copy), but am worried that we should require as little special knowledge
as possible when working on wscript files.  

Additionally, changes to wafadmin should be checked with ita, as we want
to ensure we don't take an approach that will make it harder to move to
a new upstream waf version in future.

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list