moving libaddns top-level and "merging" libcli/dns

Kai Blin kai at samba.org
Thu May 24 22:58:05 MDT 2012


On 2012-05-23 18:47, Alexander Bokovoy wrote:

Hi Alexander,

I just noticed this patchset because it broke some of my rebases..

>        via  744f991 libcli/dns: make 'clidns' private library out of DNS code in WAF build

What is this needed for? I don't understand the reason mentioned in the
commit message.

>     After consolidating DNS resolver code to lib/addns, there is one piece
>     that still needs to be moved into a common DNS resolver library: DNS_HOSTS_FILE
>     subsystem. Unfortunately, direct move would require lib/addns to depend on
>     libcli/util/{ntstatus.h,werror.h} (provided by errors subsystem).
>     
>     In addition, moving libcli/dns/* code to lib/addns/ would make conflicting
>     the dns_tkey_record struct. The conflict comes from source4/dns_server/ and is due
>     to use of IDL to define the struct. lib/addns/ library also provides its own definition
>     so we either need to keep them in sync (rewrite code in lib/addns/ a bit) or
>     depend on generated IDL headers.

A while ago when I initially proposed the internal DNS implementation, I
got quite some flak from Simo for duplicating this implementation, and
one of the reasons I mentioned was that this would finally allow us to
get rid of the multiple implementations of hand-marshalled DNS we
already have in the tree. Moving libaddns top-level and then bending the
new implementation around to make things still work is straight against
the idea behind using the IDL-based async client library.

Also, I'd like to point out that dns_host_file is a terrible, terrible
hack and is not supposed to go into the LIBCLI_DNS library at all.

>     Thus, making a private library and subsystem clidns is an intermediate step
>     that allows to buy some time fore refactoring.

Can you please, please discuss refactoring of code that is pretty recent
with the person who wrote the code in the first place? Already now this
patch forces me to clean up both my work-in-progress code as well as the
already committed code to move that dns_host_file hack out of the client
library.

I also think that we really, really should try to get rid of libaddns,
and not mark it as "ok to be used project-wide" by moving it to the top
level.

Cheers,
Kai

-- 
Kai Blin
Worldforge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120525/3bf750ad/attachment.pgp>


More information about the samba-technical mailing list