changeset 18393:a4ab0b87fb34

Make distribution dependencies also exclude libraries
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 16 Sep 2014 15:06:32 +0200
parents 3ad5d7a6adb5
children 973c6551dfd8
files mx/projects.deprecated mxtool/mx.py
diffstat 2 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/mx/projects.deprecated	Tue Oct 21 11:23:41 2014 +0200
+++ b/mx/projects.deprecated	Tue Sep 16 15:06:32 2014 +0200
@@ -130,8 +130,7 @@
 distribution@TRUFFLE-DSL-PROCESSOR@subDir=graal
 distribution@TRUFFLE-DSL-PROCESSOR@sourcesPath=build/truffle-dsl-processor.src.zip
 distribution@TRUFFLE-DSL-PROCESSOR@javaCompliance=1.7
-distribution@TRUFFLE-DSL-PROCESSOR@dependencies=\
-com.oracle.truffle.dsl.processor
+distribution@TRUFFLE-DSL-PROCESSOR@dependencies=com.oracle.truffle.dsl.processor
 distribution@TRUFFLE-DSL-PROCESSOR@distDependencies=TRUFFLE
 
 # nfi
--- a/mxtool/mx.py	Tue Oct 21 11:23:41 2014 +0200
+++ b/mxtool/mx.py	Tue Sep 16 15:06:32 2014 +0200
@@ -136,6 +136,16 @@
                     arc.zf.writestr("META-INF/MANIFEST.MF", manifest)
 
             for dep in self.sorted_deps(includeLibs=True):
+                isCoveredByDependecy = False
+                for d in self.distDependencies:
+                    if dep in _dists[d].sorted_deps(includeLibs=True, transitive=True):
+                        logv("Excluding {0} from {1} because it's provided by the dependency {2}".format(dep.name, self.path, d))
+                        isCoveredByDependecy = True
+                        break
+
+                if isCoveredByDependecy:
+                    continue
+
                 if dep.isLibrary():
                     l = dep
                     # merge library jar into distribution jar
@@ -160,16 +170,6 @@
                 elif dep.isProject():
                     p = dep
 
-                    isCoveredByDependecy = False
-                    for d in self.distDependencies:
-                        if p in _dists[d].sorted_deps():
-                            logv("Excluding {0} from {1} because it's provided by the dependency {2}".format(p.name, self.path, d))
-                            isCoveredByDependecy = True
-                            break
-
-                    if isCoveredByDependecy:
-                        continue
-
                     if self.javaCompliance:
                         if p.javaCompliance > self.javaCompliance:
                             abort("Compliance level doesn't match: Distribution {0} requires {1}, but {2} is {3}.".format(self.name, self.javaCompliance, p.name, p.javaCompliance))