From 3f2ef2846ef8e4a4d53d278a0b60ec16b2f4da10 Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Fri, 8 Sep 2023 02:52:10 -0700 Subject: [PATCH] fix: removed issues in rpm-ostree module and ublue-update bling installer (#144) * fix(rpm-ostree): format string in optfix This fixes optfix and makes the symlink not broken * fix: change rpm-ostreed auto update policy in ublue-update installer --- modules/bling/installers/ublue-update.sh | 12 +++++++++++- modules/rpm-ostree/rpm-ostree.sh | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/bling/installers/ublue-update.sh b/modules/bling/installers/ublue-update.sh index 1fec23f..33a1831 100644 --- a/modules/bling/installers/ublue-update.sh +++ b/modules/bling/installers/ublue-update.sh @@ -7,4 +7,14 @@ set -oue pipefail if rpm -q ublue-os-update-services > /dev/null; then rpm-ostree override remove ublue-os-update-services fi -rpm-ostree install "$BLING_DIRECTORY"/rpms/ublue-update*.rpm \ No newline at end of file + +# Change the conflicting update policy for rpm-ostreed +RPM_OSTREE_CONFIG="/usr/etc/rpm-ostreed.conf" + +if [[ -f $RPM_OSTREE_CONFIG ]]; then + if [[ "$(get_config_value AutomaticUpdatePolicy $RPM_OSTREE_CONFIG)" == "stage" ]]; then + set_config_value AutomaticUpdatePolicy none $RPM_OSTREE_CONFIG + fi +fi + +rpm-ostree install "$BLING_DIRECTORY"/rpms/ublue-update*.rpm diff --git a/modules/rpm-ostree/rpm-ostree.sh b/modules/rpm-ostree/rpm-ostree.sh index 5c89744..c4ee3f7 100644 --- a/modules/rpm-ostree/rpm-ostree.sh +++ b/modules/rpm-ostree/rpm-ostree.sh @@ -24,6 +24,7 @@ if [[ ${#OPTFIX[@]} -gt 0 ]]; then for OPTPKG in "${OPTFIX[@]}"; do OPTPKG="${OPTPKG%\"}" OPTPKG="${OPTPKG#\"}" + OPTPKG=$(printf "$OPTPKG") mkdir -p "/usr/lib/opt/${OPTPKG}" ln -s "../../usr/lib/opt/${OPTPKG}" "/var/opt/${OPTPKG}" echo "Created symlinks for ${OPTPKG}" @@ -54,4 +55,4 @@ elif [[ ${#INSTALL[@]} -gt 0 ]]; then echo "Removing RPMs" echo "Removing: ${REMOVE_STR[*]}" rpm-ostree override remove ${REMOVE_STR[@]} -fi \ No newline at end of file +fi