X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/48c38895200cdafaaeca37299bf8352878389a77..ee499fb6d4ff05dd13854b0c1f57ef77e939b507:/build/run-library.sh diff --git a/build/run-library.sh b/build/run-library.sh index ac5dc718be..beb23f563a 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -638,7 +638,8 @@ fpm_build_virtualenv () { COMMAND_ARR+=('-n' "$PYTHON_PKG") COMMAND_ARR+=('-C' "build") - if [[ -e "$WORKSPACE/$PKG_DIR/$PKG.service" ]]; then + systemd_unit="$WORKSPACE/$PKG_DIR/$PKG.service" + if [[ -e "${systemd_unit}" ]]; then COMMAND_ARR+=('--after-install' "${WORKSPACE}/build/go-python-package-scripts/postinst") COMMAND_ARR+=('--before-remove' "${WORKSPACE}/build/go-python-package-scripts/prerm") fi @@ -671,6 +672,12 @@ fpm_build_virtualenv () { COMMAND_ARR+=('--depends' "$i") done + # make sure the systemd service file ends up in the right place + # currently only used by arvados-docker-cleaner + if [[ -e "${systemd_unit}" ]]; then + COMMAND_ARR+=("usr/share/python3/dist/$PKG/share/doc/$PKG/$PKG.service=/lib/systemd/system/$PKG.service") + fi + COMMAND_ARR+=("${fpm_args[@]}") # Make sure to install all our package binaries in /usr/bin. @@ -912,7 +919,9 @@ timer_reset() { } timer() { - echo -n "$(($SECONDS - $t0))s" + if [[ -n "$t0" ]]; then + echo -n "$(($SECONDS - $t0))s" + fi } report_outcomes() {