From 2825020f7e181280cda0a245847ab56a0a1448e5 Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Sat, 19 Mar 2011 19:53:11 +0300 Subject: [PATCH] tg-update: correctly return error for missing deps Adding -a introduced following regression: no error was returned after missing deps to allow continuing with next branch. This means missing dependencies during recursion were ignored (althouth warning was output). Always abort with error unless called with "-a"; recursive never does it. Signed-off-by: Andrey Borzenkov --- tg-update.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tg-update.sh b/tg-update.sh index 8d5ffc1..ecbc0d5 100644 --- a/tg-update.sh +++ b/tg-update.sh @@ -45,7 +45,14 @@ update_branch() { depcheck="$(get_temp tg-depcheck)" missing_deps= needs_update "$name" >"$depcheck" || : - [ -z "$missing_deps" ] || { info "some dependencies are missing: $missing_deps; skpping"; return; } + if [ -n "$missing_deps" ]; then + if [ -z "$all" ]; then + die "some dependencies are missing: $missing_deps" + else + info "some dependencies are missing: $missing_deps; skipping" + return + fi + fi if [ -s "$depcheck" ]; then # We need to switch to the base branch # ...but only if we aren't there yet (from failed previous merge) -- 2.11.4.GIT