waf: Do not install _ldb_text.py if we have system libldb
authorAndreas Schneider <asn@samba.org>
Thu, 6 Jul 2017 05:44:28 +0000 (07:44 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 7 Jul 2017 07:14:26 +0000 (09:14 +0200)
_ldb_text.py is installed as part of the ldb package and also if you
compile Samba with the system ldb version. This way we have have the
file twice in the same location and run into file confilcts.

This has already been fixed some time ago:
    60dc26bfe1573265dcbd87b9dd3439f945e57d97

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12882

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
lib/ldb/wscript

index 7f81fe3f09803668dd04cfa8275a284cc89f8182..b4ae62a30ec2cd229a508cef8a8d2ddffe313a73 100644 (file)
@@ -177,12 +177,15 @@ def build(bld):
                                      realname='ldb.so',
                                      cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
 
-        for env in bld.gen_python_environments(['PKGCONFIGDIR']):
-                bld.SAMBA_SCRIPT('_ldb_text.py',
-                                 pattern='_ldb_text.py',
-                                 installdir='python')
+        # Do only install this file as part of the Samba build if we do not
+        # use the system libldb!
+        if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'):
+            for env in bld.gen_python_environments(['PKGCONFIGDIR']):
+                    bld.SAMBA_SCRIPT('_ldb_text.py',
+                                     pattern='_ldb_text.py',
+                                     installdir='python')
 
-                bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py')
+                    bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py')
 
     if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
         if bld.is_install: