From 91f3b6f899776cbb9f5bc85a7c1dfe96dc261927 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Wed, 26 Sep 2018 11:06:40 -0400 Subject: [PATCH] build-pkg pkg-name of std pkg causes rt build failure Brief Description ----------------- Designer issues 'build-pkg pkg-name' where pkg-name is only valid for std builds. Expected result is that only 'std' build is executed on the named package. What is observed is that aftes a successful std build, an 'rt' build is executed with an invalid package list causing a failure. The package is built correctly, but command returns 1. This breaks scripts that test build-pkgs return code. Problem ------- find_targets returned $EMPTY_LIST rather than $EMPTY_TARGETS as expected. Solution -------- find_targets must return $EMPTY_TARGETS when no targets are found for the build type. Closes-Bug: 1794542 Change-Id: I3d21bb793b1fc9637b16a08fdfcd2fd998742bfb Signed-off-by: Scott Little --- build-tools/build-pkgs-parallel | 8 ++------ build-tools/build-pkgs-serial | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/build-tools/build-pkgs-parallel b/build-tools/build-pkgs-parallel index 7d7bb2cc..55f35b56 100755 --- a/build-tools/build-pkgs-parallel +++ b/build-tools/build-pkgs-parallel @@ -174,7 +174,7 @@ find_targets () { local x="" local name="" local path="" - local RESULT=" " + local RESULT="$EMPTY_TARGETS" local FOUND=0 for d in $GIT_LIST; do @@ -234,11 +234,7 @@ find_targets () { fi done - if [ "$RESULT" == " " ]; then - echo "$EMPTY_LIST" - else - echo "$RESULT" - fi + echo "$RESULT" return 0 } diff --git a/build-tools/build-pkgs-serial b/build-tools/build-pkgs-serial index 103ef537..a1eb4220 100755 --- a/build-tools/build-pkgs-serial +++ b/build-tools/build-pkgs-serial @@ -174,7 +174,7 @@ find_targets () { local x="" local name="" local path="" - local RESULT=" " + local RESULT="$EMPTY_TARGETS" local FOUND=0 for d in $GIT_LIST; do @@ -234,11 +234,7 @@ find_targets () { fi done - if [ "$RESULT" == " " ]; then - echo "$EMPTY_LIST" - else - echo "$RESULT" - fi + echo "$RESULT" return 0 }