Build Avoidance bugs found in final test.

Problems:

1) build avoidance arguements can't be overriden via build-pkgs command
line.  The command line must be processed prior to sourcing
build-avoidance-utils.sh.

2) build_avoidance_fixups is failing to restore rpms to a pre-signed state.

Fixes:

1) Move 'source build-avoidance-utils.sh' below argement parsing.

2) Fix a variable name. It was missed when a prior code review requested
more descriptive variable names.

Change-Id: Iec2eeb7e2a3fb782e08909bea973e2ed7a9706a3
Story: 2002835
Task: 22754
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2018-10-03 15:55:13 -04:00
parent 3bb3717023
commit 90b095185b
3 changed files with 7 additions and 3 deletions

View File

@ -727,7 +727,7 @@ build_avoidance_fixups () {
for rpm_path_post_signing in $(find $MY_WS_BT/rpmbuild/RPMS -type f -name '*.rpm' | grep -v src.rpm); do
rpm_name=$(basename $rpm_path_post_signing)
rpm_path_pre_signing=$(find $MY_WS_BT/results -name $b | head -n1)
rpm_path_pre_signing=$(find $MY_WS_BT/results -name $rpm_name | head -n1)
if [ "$rpm_path_pre_signing" != "" ]; then
md5sum_post_signing=$(md5sum ${rpm_path_post_signing} | cut -d ' ' -f 1)
md5sum_pre_signing=$(md5sum ${rpm_path_pre_signing} | cut -d ' ' -f 1)

View File

@ -16,7 +16,6 @@
BUILD_PKGS_PARALLEL_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
source "${BUILD_PKGS_PARALLEL_DIR}/git-utils.sh"
source "${BUILD_PKGS_PARALLEL_DIR}/build-avoidance-utils.sh"
source "${BUILD_PKGS_PARALLEL_DIR}/spec-utils"
@ -112,6 +111,9 @@ if [ $HELP -eq 1 ]; then
exit 0
fi
# Don't source until after BUILD_AVOIDANCE_OVERRIDE_* variables are set.
source "${BUILD_PKGS_PARALLEL_DIR}/build-avoidance-utils.sh"
function my_exit() {
build-rpms-parallel --std --tmpfs-clean
build-rpms-parallel --rt --tmpfs-clean

View File

@ -16,7 +16,6 @@
BUILD_PKGS_SERIAL_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
source "${BUILD_PKGS_SERIAL_DIR}/git-utils.sh"
source "${BUILD_PKGS_SERIAL_DIR}/build-avoidance-utils.sh"
source "${BUILD_PKGS_SERIAL_DIR}/spec-utils"
@ -112,6 +111,9 @@ if [ $HELP -eq 1 ]; then
exit 0
fi
# Don't source until after BUILD_AVOIDANCE_OVERRIDE_* variables are set.
source "${BUILD_PKGS_SERIAL_DIR}/build-avoidance-utils.sh"
function my_exit() {
build-rpms-parallel --std --tmpfs-clean
build-rpms-parallel --rt --tmpfs-clean