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
This commit is contained in:
@@ -360,6 +360,7 @@ The makefile is written to stdout, to be put in the current directory (often as
|
|||||||
|
|
||||||
poms := []*Pom{}
|
poms := []*Pom{}
|
||||||
modules := make(map[string]*Pom)
|
modules := make(map[string]*Pom)
|
||||||
|
duplicate := false
|
||||||
for _, filename := range filenames {
|
for _, filename := range filenames {
|
||||||
pom, err := parse(filename)
|
pom, err := parse(filename)
|
||||||
if err != nil {
|
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 {
|
if old, ok := modules[key]; ok {
|
||||||
fmt.Fprintln(os.Stderr, "Module", key, "defined twice:", old.PomFile, pom.PomFile)
|
fmt.Fprintln(os.Stderr, "Module", key, "defined twice:", old.PomFile, pom.PomFile)
|
||||||
|
duplicate = true
|
||||||
}
|
}
|
||||||
|
|
||||||
modules[key] = pom
|
modules[key] = pom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if duplicate {
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
for _, pom := range poms {
|
for _, pom := range poms {
|
||||||
pom.FixDeps(modules)
|
pom.FixDeps(modules)
|
||||||
|
Reference in New Issue
Block a user