Update mockchain-parallel wrapper for mock-1.4.20
The recently released mock-1.4.20 replaces mockchain with a bash wrapper that calls mock --chain. However, the StarlingX mockchain-parallel utility assumes mockchain is python, and fails to determine the mockchain version as a result. This causes build failures when mock-1.4.20 is installed. This update enhances mockchain-parallel to use the version from the installed mock rpm if the version cannot be determined from mockchain itself. This allows mockchain-parallel to work with mock-1.4.20, as well as previously supported versions of mock. Change-Id: Ic0360fc64e277f1816036b6259e6e51d94c7f368 Closes-Bug: 1849147 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
3687c0b998
commit
639e435594
@ -59,8 +59,11 @@ DEFAULT_MOCKCHAIN_PARALLEL_PATH="${MOCKCHAIN_PARALLEL_PATH_ROOT}-1.3.4"
|
||||
MOCKCHAIN_INTERPRETER_PATH=$(interpreter_path ${MOCKCHAIN_PATH})
|
||||
MOCKCHAIN_VER=$(get__version__ ${MOCKCHAIN_PATH})
|
||||
if [ -z "${MOCKCHAIN_VER}" ]; then
|
||||
echo "Error: Failed to determine version of '${MOCKCHAIN_PATH}'"
|
||||
exit 1
|
||||
MOCKCHAIN_VER=$(rpm -q --queryformat '%{VERSION}' mock)
|
||||
if [ -z "${MOCKCHAIN_VER}" ]; then
|
||||
echo "Error: Failed to determine version of '${MOCKCHAIN_PATH}'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
BEST_VER=""
|
||||
@ -101,5 +104,5 @@ if [ -z "${MOCKCHAIN_PARALLEL_PATH}" ]; then
|
||||
MOCKCHAIN_PARALLEL_PATH="${DEFAULT_MOCKCHAIN_PARALLEL_PATH}"
|
||||
fi
|
||||
|
||||
echo "PYTHONDONTWRITEBYTECODE=true exec ${MOCKCHAIN_INTERPRETER_PATH} ${MOCKCHAIN_PARALLEL_PATH} $@"
|
||||
PYTHONDONTWRITEBYTECODE=true exec ${MOCKCHAIN_INTERPRETER_PATH} ${MOCKCHAIN_PARALLEL_PATH} "$@"
|
||||
echo "PYTHONDONTWRITEBYTECODE=true exec ${MOCKCHAIN_PARALLEL_INTERPRETER_PATH} ${MOCKCHAIN_PARALLEL_PATH} $@"
|
||||
PYTHONDONTWRITEBYTECODE=true exec ${MOCKCHAIN_PARALLEL_INTERPRETER_PATH} ${MOCKCHAIN_PARALLEL_PATH} "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user