From a8d68238bd11115dc772078e62e47a525e63fd73 Mon Sep 17 00:00:00 2001 From: ajp_anton Date: Sat, 5 Sep 2026 05:36:50 +0000 Subject: [PATCH] Fix tool installation and updates --- fedora-tools-settings/fedora-tools-settings.spec | 8 +++++++- fedora-tools-settings/src/helper.cpp | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fedora-tools-settings/fedora-tools-settings.spec b/fedora-tools-settings/fedora-tools-settings.spec index 2ed58e7..af1485d 100644 --- a/fedora-tools-settings/fedora-tools-settings.spec +++ b/fedora-tools-settings/fedora-tools-settings.spec @@ -1,6 +1,6 @@ Name: fedora-tools-settings Version: 0.1.0 -Release: 5%{?dist} +Release: 7%{?dist} Summary: Plasma System Settings module for Fedora Tools License: MIT @@ -59,6 +59,12 @@ install -Dpm 0644 %{SOURCE2} \ %{_datadir}/polkit-1/actions/se.ajpanton.fedoratools.policy %changelog +* Sat Sep 05 2026 fedora-tools contributors - 0.1.0-7 +- Use the DNF upgrade transaction for installed tools + +* Sat Sep 05 2026 fedora-tools contributors - 0.1.0-6 +- Refresh privileged DNF metadata before installing a tool + * Sat Sep 05 2026 fedora-tools contributors - 0.1.0-5 - Fix button contrast and timing-value loading - Separate touchpad anchor age from its stationary-time setting diff --git a/fedora-tools-settings/src/helper.cpp b/fedora-tools-settings/src/helper.cpp index 5575d3f..dffd1f3 100644 --- a/fedora-tools-settings/src/helper.cpp +++ b/fedora-tools-settings/src/helper.cpp @@ -55,6 +55,7 @@ bool isPublishedTool(const QString &packageName) process.start(QStringLiteral("/usr/bin/dnf5"), {QStringLiteral("--repo=fedora-tools"), QStringLiteral("-q"), + QStringLiteral("--refresh"), QStringLiteral("repoquery"), QStringLiteral("--available"), QStringLiteral("--whatprovides=fedora-tools-tool"), @@ -119,8 +120,11 @@ public Q_SLOTS: return reply; } + const QString command = isInstalledTool(packageName) + ? QStringLiteral("upgrade") + : QStringLiteral("install"); return commandReply(QStringLiteral("/usr/bin/dnf5"), - {QStringLiteral("install"), + {command, QStringLiteral("--assumeyes"), QStringLiteral("--from-repo=fedora-tools"), packageName});