aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2018-03-29 14:59:01 -0400
committerJeff Gaston <jeffrygaston@google.com>2018-04-09 12:44:13 -0400
commit4447ff7d38a4df9525203d688a9ae9fc9ba72860 (patch)
tree4efa7952dd3f6951a527e887c31013b8fcf55daa
parent15a7f831046d5c277ad8159f4452210ad9f0caa5 (diff)
downloadbuild_soong-4447ff7d38a4df9525203d688a9ae9fc9ba72860.tar.gz
build_soong-4447ff7d38a4df9525203d688a9ae9fc9ba72860.tar.bz2
build_soong-4447ff7d38a4df9525203d688a9ae9fc9ba72860.zip
Have pom2mk list all duplicates modules
For easier debugging if there are multiple duplicates Bug: 76692459 Test: ./update_current.py -x <build-id> Change-Id: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f Merged-In: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
-rw-r--r--cmd/pom2mk/pom2mk.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/pom2mk/pom2mk.go b/cmd/pom2mk/pom2mk.go
index d45067fc..80941608 100644
--- a/cmd/pom2mk/pom2mk.go
+++ b/cmd/pom2mk/pom2mk.go
@@ -360,6 +360,7 @@ The makefile is written to stdout, to be put in the current directory (often as
poms := []*Pom{}
modules := make(map[string]*Pom)
+ duplicate := false
for _, filename := range filenames {
pom, err := parse(filename)
if err != nil {
@@ -373,11 +374,15 @@ The makefile is written to stdout, to be put in the current directory (often as
if old, ok := modules[key]; ok {
fmt.Fprintln(os.Stderr, "Module", key, "defined twice:", old.PomFile, pom.PomFile)
+ duplicate = true
}
modules[key] = pom
}
}
+ if duplicate {
+ os.Exit(1)
+ }
for _, pom := range poms {
pom.FixDeps(modules)