From 7016b599335bf894ea4a68350660c48078ea7cc7 Mon Sep 17 00:00:00 2001 From: Elysia <1391048988@qq.com> Date: Fri, 21 Nov 2025 02:03:29 +0800 Subject: [PATCH] fix: uninstall.sh is now working properly. --- sdata/dist-fedora/.gitignore | 2 +- sdata/dist-fedora/uninstall-deps.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdata/dist-fedora/.gitignore b/sdata/dist-fedora/.gitignore index 6cee98f25..8ef73d075 100644 --- a/sdata/dist-fedora/.gitignore +++ b/sdata/dist-fedora/.gitignore @@ -1,4 +1,4 @@ /*/*.tar.* /*/pkg/ /*/src/ -user-config.yaml \ No newline at end of file +user_data.yaml \ No newline at end of file diff --git a/sdata/dist-fedora/uninstall-deps.sh b/sdata/dist-fedora/uninstall-deps.sh index fa758146a..b799583f4 100644 --- a/sdata/dist-fedora/uninstall-deps.sh +++ b/sdata/dist-fedora/uninstall-deps.sh @@ -1,10 +1,12 @@ # This script is meant to be sourced. # It's not for directly running. -user_config="${REPO_ROOT}/sdata/dist-fedora/user-config.yaml" -yq -r '.dnf.transaction_ids[]? | reverse' "$user_config" | while read -r tx_id; do +user_data="${REPO_ROOT}/sdata/dist-fedora/user_data.yaml" +yq eval '.dnf.transaction_ids // [] | reverse[]' "$user_data" | while read -r tx_id; do echo -e "\n========================================" - echo "Rolling back DNF Transactions ID:$tx_id" + echo "Rolling back DNF Transactions ID: $tx_id" echo "========================================" - v sudo dnf history undo -y "$tx_id" + dnf history info "$tx_id" + echo -e "\nProceed to undo this transaction? " + v sudo dnf history undo -y "$tx_id"