summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-13 09:33:18 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-13 09:36:03 +1000
commit9c6781277a9ebf5e0a9d65ece14b95335d596af6 (patch)
tree57ee8ea50165e46e1688b3b19f85a11598999bb9 /buildtools/wafsamba
parentb1a27e81d712ada8eebc587a4c35fbb48b4762cb (diff)
downloadsamba-9c6781277a9ebf5e0a9d65ece14b95335d596af6.tar.gz
samba-9c6781277a9ebf5e0a9d65ece14b95335d596af6.tar.bz2
samba-9c6781277a9ebf5e0a9d65ece14b95335d596af6.zip
build: cope with existing binaries in bin/ left over from the old build
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_install.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 6da4493218..28bd270dd4 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -133,8 +133,7 @@ def symlink_lib(self):
link_target = os.path.join(blddir, link_target)
if os.path.lexists(link_target):
- old_link = os.readlink(link_target)
- if libpath == old_link:
+ if os.path.islink(link_target) and os.readlink(link_target) == libpath:
return
os.unlink(link_target)
os.symlink(libpath, link_target)
@@ -153,8 +152,7 @@ def symlink_bin(self):
bldpath = os.path.join(self.bld.env.BUILD_DIRECTORY, self.link_task.outputs[0].name)
if os.path.lexists(bldpath):
- old_link = os.readlink(bldpath)
- if binpath == old_link:
+ if os.path.islink(bldpath) and os.readlink(bldpath) == binpath:
return
os.unlink(bldpath)
os.symlink(binpath, bldpath)