On Mon, 2010-01-11 at 17:33 +1100, Brad Hards wrote:
> Hi,
>
> I was testing the recent samba4 alpha11, and had a problem with the
> provisioning of openchange server.
>
> This is the symptom:
> [r...@repens merging]# ./setup/openchange_provision
> Traceback (most recent call last):
> File "./setup/openchange_provision", line 27, in <module>
> samba_path = find_samba_python_path()
> File "python/openchange/__init__.py", line 42, in find_samba_python_path
> raise ImportError("Unable to find the Samba python path")
> ImportError: Unable to find the Samba python path
>
> It looks like alpha11 (and maybe some earlier samba4 variants) install the
> python stuff to /usr/local/samba/lib64/python2.x on 64-bit builds. Our script
> can't find it.
>
> Proposed patch:
> Index: python/openchange/__init__.py
> ===================================================================
> --- python/openchange/__init__.py (revision 1682)
> +++ python/openchange/__init__.py (working copy)
> @@ -32,11 +32,13 @@
> return None # No extra path necessary
> except ImportError:
> SAMBA_PREFIXES = ["/usr/local/samba", "/opt/samba"]
> + LIB_DIRS = ["lib", "lib64"]
> PYTHON_NAMES = ["python2.3", "python2.4", "python2.5", "python2.6"]
> for samba_prefix in SAMBA_PREFIXES:
> - for python_name in PYTHON_NAMES:
> - path = os.path.join(samba_prefix, "lib", python_name,
> - "site-packages")
> - if os.path.isdir(os.path.join(path, "samba")):
> - return path
> + for lib_dir in LIB_DIRS:
> + for python_name in PYTHON_NAMES:
> + path = os.path.join(samba_prefix, lib_dir, python_name,
> + "site-packages")
> + if os.path.isdir(os.path.join(path, "samba")):
> + return path
> raise ImportError("Unable to find the Samba python path")
>
> OK to apply?Sounds good for me. Please apply. Julien Kerihuel [email protected] OpenChange Project Manager GPG Fingerprint: 0B55 783D A781 6329 108A B609 7EF6 FE11 A35F 1F79
signature.asc
Description: This is a digitally signed message part
_______________________________________________ devel mailing list [email protected] http://mailman.openchange.org/listinfo/devel
