From d7939efaa907fc3a716e28c6e165eb062f603ca4 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 31 Dec 2024 13:13:35 +0100 Subject: [PATCH] Fix package install in envs using python lower than 3.12 on debian like OSs (#8793) * do not install with uv for now - fixes #8789 #8742 #8495 #8494 * Ensure errors are raised if install / update fails --- contrib/packager.io/functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/packager.io/functions.sh b/contrib/packager.io/functions.sh index 5127f4ec90..a08a9f0999 100755 --- a/contrib/packager.io/functions.sh +++ b/contrib/packager.io/functions.sh @@ -292,14 +292,15 @@ function stop_inventree() { } function update_or_install() { + set -e # Set permissions so app user can write there chown ${APP_USER}:${APP_GROUP} ${APP_HOME} -R # Run update as app user echo "# POI12| Updating InvenTree" - sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install uv wheel" - sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update --uv | sed -e 's/^/# POI12| u | /;'" + sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install wheel" + sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update | sed -e 's/^/# POI12| u | /;'" # Make sure permissions are correct again echo "# POI12| Set permissions for data dir and media: ${DATA_DIR}"