[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Tue May 31 22:51:02 MDT 2011
The branch, master has been updated
via f725e2b build: fixed a problem with installing scripts in the build tree
from 5a8218b s3-param Make lp_ncalrpc_dir() const
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f725e2b64eec48c0fe21a125065152c684d361ee
Author: Andrew Tridgell <tridge at samba.org>
Date: Wed Jun 1 11:43:52 2011 +1000
build: fixed a problem with installing scripts in the build tree
the SAMBA_SCRIPT() function was not always triggering correctly. The
base problem was that we were using a target outside the build
tree. This implements a simpler solution where we just create the
links directly in SAMBA_SCRIPT() rather than creating a waf task
Autobuild-User: Andrew Tridgell <tridge at samba.org>
Autobuild-Date: Wed Jun 1 06:50:04 CEST 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/wafsamba.py | 27 +++++++++------------------
1 files changed, 9 insertions(+), 18 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 2a1c82a..43b7f61 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -628,17 +628,6 @@ def ENABLE_TIMESTAMP_DEPENDENCIES(conf):
Utils.h_file = h_file
-
-t = Task.simple_task_type('copy_script', 'rm -f "${LINK_TARGET}" && ln -s "${SRC[0].abspath(env)}" ${LINK_TARGET}',
- shell=True, color='PINK', ext_in='.bin')
-t.quiet = True
-
- at feature('copy_script')
- at before('apply_link')
-def copy_script(self):
- tsk = self.create_task('copy_script', self.allnodes[0])
- tsk.env.TARGET = self.target
-
def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
'''used to copy scripts from the source tree into the build directory
for use by selftest'''
@@ -653,15 +642,17 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
target = os.path.join(installdir, iname)
tgtdir = os.path.dirname(os.path.join(bld.srcnode.abspath(bld.env), '..', target))
mkdir_p(tgtdir)
- t = bld(features='copy_script',
- source = s,
- target = target,
- always = True,
- install_path = None)
- t.env.LINK_TARGET = target
-
+ link_src = os.path.normpath(os.path.join(bld.curdir, s))
+ link_dst = os.path.join(tgtdir, os.path.basename(iname))
+ if os.path.islink(link_dst) and os.readlink(link_dst) == link_src:
+ continue
+ if os.path.exists(link_dst):
+ os.unlink(link_dst)
+ Logs.info("symlink: %s -> %s/%s" % (s, installdir, iname))
+ os.symlink(link_src, link_dst)
Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
+
def copy_and_fix_python_path(task):
pattern='sys.path.insert(0, "bin/python")'
if task.env["PYTHONARCHDIR"] in sys.path and task.env["PYTHONDIR"] in sys.path:
--
Samba Shared Repository
More information about the samba-cvs
mailing list