s4-build: fixed uses of os.path.relpath()
authorAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 04:03:26 +0000 (15:03 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 04:49:58 +0000 (05:49 +0100)
these should be os_path_relpath() to support older python versions.
This should fix the build on FreeBSD 7.2

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Feb  7 05:49:58 CET 2011 on sn-devel-104

buildtools/wafsamba/samba_dist.py
source4/dynconfig/wscript

index d2be291703d15780b90f8f594a76cdccc55a8534..a11a37cc1bf7595bddc531587aeebc38b3bd6cf9 100644 (file)
@@ -80,14 +80,14 @@ def vcs_dir_contents(path):
     while repo != "/":
         if os.path.isdir(os.path.join(repo, ".git")):
             ls_files_cmd = [ 'git', 'ls-files', '--full-name',
-                             os.path.relpath(path, repo) ]
+                             os_path_relpath(path, repo) ]
             cwd = None
             env = dict(os.environ)
             env["GIT_DIR"] = os.path.join(repo, ".git")
             break
         elif os.path.isdir(os.path.join(repo, ".bzr")):
             ls_files_cmd = [ 'bzr', 'ls', '--recursive', '--versioned',
-                             os.path.relpath(path, repo)]
+                             os_path_relpath(path, repo)]
             cwd = repo
             env = None
             break
index 6cebf7ee7fd290a17a6f9212fe2ac9c8f64b865e..50ae44f9adcf29e3cac9312a84918bf864431311 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 import string, Utils, Options, sys, Build, os
-from samba_utils import EXPAND_VARIABLES
+from samba_utils import EXPAND_VARIABLES, os_path_relpath
 
 # list of directory options to offer in configure
 dir_options = {
@@ -145,6 +145,6 @@ def build(bld):
     bld.SAMBA_SUBSYSTEM('DYNCONFIG',
                         'dynconfig.c',
                         deps='replace talloc',
-                        public_headers=os.path.relpath(os.path.join(Options.launch_dir, 'version.h'), bld.curdir),
+                        public_headers=os_path_relpath(os.path.join(Options.launch_dir, 'version.h'), bld.curdir),
                         header_path='samba',
                         cflags=cflags)