A dep should only be listed once in .topdeps, force this.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
# therefore no endless loop in the cycle-check
no_remotes=1 recurse_deps check_cycle_name "$newly_added"
done
# therefore no endless loop in the cycle-check
no_remotes=1 recurse_deps check_cycle_name "$newly_added"
done
+
+# check for repetitions of deps
+depdir="$(mktemp -t -d tg-depdir.XXXXXX)" ||
+ die "Can't check for multiple occurrences of deps"
+trap "rm -rf '$depdir'" 0
+cat_file "(i):.topdeps" |
+ while read dep; do
+ [ ! -d "$depdir/$dep" ] ||
+ die "Multiple occurrences of the same dep: $dep"
+ mkdir -p "$depdir/$dep" ||
+ die "Can't check for multiple occurrences of deps"
+ done