wafsamba/samba_utils.py: override symlink to allow force link
authorJoe Guo <joeg@catalyst.net.nz>
Tue, 12 Feb 2019 06:16:06 +0000 (19:16 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 13 Feb 2019 03:15:15 +0000 (04:15 +0100)
commitc9fa0a05d90f8c1d84c41efe32a6938c026dc328
tree767a57b0f9ed54e6a641bca4eb5b2bd4f096be1a
parent22c016b12142e675c5b8ef0ea1f450385f555268
wafsamba/samba_utils.py: override symlink to allow force link

if bin is not empty and I have been sharing the samba tree into
a Vagrant environment and we run make, we get annoying linking error like this:

     File "~/samba/lib/tevent/wscript", line 130, in build
        installdir='python')
      File "./buildtools/wafsamba/wafsamba.py", line 745, in SAMBA_SCRIPT
        os.symlink(link_src, link_dst)
    FileExistsError: [Errno 17] File exists: '~/samba/lib/tevent/tevent.py' -> '~/samba/bin/default/../python/tevent.py'
    Makefile:7: recipe for target 'all' failed

Override the symlink method to allow force linking.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_utils.py
buildtools/wafsamba/wafsamba.py