[PATCH] Fix the last of the defaults and include a test to check them

Michael Adam obnox at samba.org
Sun Feb 2 11:07:15 MST 2014


On 2014-02-02 at 14:10 +0100, Michael Adam wrote:
> On 2014-02-02 at 09:12 +1300, Andrew Bartlett wrote:
> > On Sat, 2014-02-01 at 13:39 +0100, Michael Adam wrote:
> > > On 2014-01-31 at 21:09 +0100, Michael Adam wrote:
> > > 
> > > For some of the parameters, when adding metadata, you don't add
> > > a function or generated_function field. Is that missing?
> > > Or what are the systematics here?
> > 
> > The idea is that, by default the generate-param.py script shouldn't need
> > this.  Ideally the function should be the name of the parameter, with
> > spaces becoming _.  Ideally the build system would always generate the
> > matching function.  Sadly we are very inconsistent in our names here,
> > and so much more metadata is required than I ever imagined, and what
> > existed was so often incorrect.  Thankfully Garming was able to script
> > the additions, but what looks like a special case was really meant to be
> > the default/normal case :-).
> 
> OK understood - thanks.
> But why don't we rename the functions to be consistent with
> the parameter names (where possible)? That would seem the
> logical step to me. This would also render most of the
> 30-something patches in which you add "function" metadata
> unneccessary.
> 
> E.g. "add share command":
> 
> - in 833e8cb7a8f64f9cb2a30802954484bd125c5626 you changed the
>   variable used for this from szAddShareCommand to add_share_cmd
>   to match the function name.
> 
> - Wouldn't it be better to first change the function name
>   to match the parameter name, i.e.  add_share_command"and then
>   adapt the variable to match the function and hence the parameter
>   name, thereby removing the special case?
> 
> - I guess that you didn't want to have to touch the callers
>   thereby minimizing the scope of the patches, but I think
>   this would be really justified.
> 
> ==> I will present a few patches later.

You can see a few first patches in my master-param branch
under
https://git.samba.org/?p=obnox/samba/samba-obnox.git;a=shortlog;h=master-param

This renders the "add function metadata" kind of patches
unneccessary. 
I will later first push the other patches (those not adding
function metadata) and then continue on some patches
in the above direction.

Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140202/a71194f8/attachment.pgp>


More information about the samba-technical mailing list