From dc4dbfb4b18253801f360fab6bb96bd70c3a7352 Mon Sep 17 00:00:00 2001 From: nephros Date: Mon, 16 Jan 2023 10:45:18 +0100 Subject: [PATCH] Make --reset-system child-safe. Contributes-To: #204 --- src/bin/patchmanager-daemon/patchmanagerobject.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bin/patchmanager-daemon/patchmanagerobject.cpp b/src/bin/patchmanager-daemon/patchmanagerobject.cpp index 9b59fcf41..da6dabcd9 100644 --- a/src/bin/patchmanager-daemon/patchmanagerobject.cpp +++ b/src/bin/patchmanager-daemon/patchmanagerobject.cpp @@ -70,6 +70,8 @@ #include #include "inotifywatcher.h" +#include + #include #include @@ -890,6 +892,7 @@ void PatchManagerObject::resetSystem() return; } +/* qDebug() << Q_FUNC_INFO << "Refreshing repositories."; QProcess refreshProc; refreshProc.start(BIN_PKCON, { QStringLiteral("refresh") }); @@ -907,6 +910,12 @@ void PatchManagerObject::resetSystem() } else { qDebug() << Q_FUNC_INFO << "Failed to reinstall RPM package!"; } +*/ + std::cout << "## The automatic system reset function has been removed from Patchmanager." << std::endl; + std::cout << "## In order to re-install all packages affected by any of the installed patches, do the following:" << std::endl; + std::cout << BIN_PKCON.toUtf8().constData() << " refresh" << std::endl; + for (const QString &package : packages) { + std::cout << BIN_PKCON.toUtf8().constData() << " install -y --allow-reinstall " << package.toUtf8().constData() << std::endl; } QCoreApplication::exit(0);