Skip to content

Commit

Permalink
Make --reset-system child-safe.
Browse files Browse the repository at this point in the history
Contributes-To: sailfishos-patches#204
  • Loading branch information
nephros committed Jan 16, 2023
1 parent 13c5134 commit dc4dbfb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bin/patchmanager-daemon/patchmanagerobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
#include <nemonotifications-qt5/notification.h>
#include "inotifywatcher.h"

#include <iostream>

#include <unistd.h>
#include <sys/stat.h>

Expand Down Expand Up @@ -890,6 +892,7 @@ void PatchManagerObject::resetSystem()
return;
}

/*
qDebug() << Q_FUNC_INFO << "Refreshing repositories.";
QProcess refreshProc;
refreshProc.start(BIN_PKCON, { QStringLiteral("refresh") });
Expand All @@ -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);
Expand Down

0 comments on commit dc4dbfb

Please sign in to comment.