[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Wed Apr 14 22:12:16 MDT 2010
The branch, master has been updated
via 34887de... build: ensure we don't recreate library loops in expansions
from 167ba0e... build: make the 'wrong version of waf' message even clearer
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 34887de6b0615f0f63f497f9020d1c059643f8ec
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Apr 15 13:59:51 2010 +1000
build: ensure we don't recreate library loops in expansions
after removing library loops from the dependeny graph, we re-add
parent dependencies. We need to ensure that we don't re-add a
dependency which re-creates the loop we so carefully removed.
This also adds a final check for library dependency loops, and shows
an appropriate error if one is found.
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_deps.py | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index fbc3223..7beec29 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -605,6 +605,8 @@ def reduce_objects(bld, tgt_list):
t2 = bld.name_to_obj(l, bld.env)
t2_obj = extended_objects(bld, t2, set())
dup = new.intersection(t2_obj)
+ if t.sname in rely_on:
+ dup = dup.difference(rely_on[t.sname])
if dup:
debug('deps: removing dups from %s of type %s: %s also in %s %s',
t.sname, t.samba_type, dup, t2.samba_type, l)
@@ -669,8 +671,18 @@ def calculate_final_deps(bld, tgt_list, loops):
diff = loops[loop].difference(t.final_libs)
if t.sname in diff:
diff.remove(t.sname)
+ if t.sname in diff:
+ diff.remove(t.sname)
+ # make sure we don't recreate the loop again!
+ for d in diff.copy():
+ t2 = bld.name_to_obj(d, bld.env)
+ if t2.samba_type == 'LIBRARY':
+ if t.sname in t2.final_libs:
+ debug('deps: removing expansion %s from %s', d, t.sname)
+ diff.remove(d)
if diff:
- debug('deps: Expanded target %s by loop %s libraries %s', t.sname, loop, diff)
+ debug('deps: Expanded target %s by loop %s libraries (loop %s) %s', t.sname, loop,
+ loops[loop], diff)
t.final_libs = t.final_libs.union(diff)
# remove objects that are also available in linked libs
@@ -697,6 +709,19 @@ def calculate_final_deps(bld, tgt_list, loops):
syslibs = syslibs.union(t2.direct_syslibs)
t.final_syslibs = syslibs
+
+ # find any unresolved library loops
+ lib_loop_error = False
+ for t in tgt_list:
+ if t.samba_type in ['LIBRARY', 'PYTHON']:
+ for l in t.final_libs.copy():
+ t2 = bld.name_to_obj(l, bld.env)
+ if t.sname in t2.final_libs:
+ Logs.error('ERROR: Unresolved library loop %s from %s' % (t.sname, t2.sname))
+ lib_loop_error = True
+ if lib_loop_error:
+ sys.exit(1)
+
debug('deps: removed duplicate dependencies')
--
Samba Shared Repository
More information about the samba-cvs
mailing list