Commit a48a4126 authored by Lisa's avatar Lisa

Exit for empty queue only after we compute replacements.

In case of an update, the initial update list may be empty,
but it is then filled up with replacements. Avoid exiting
in that case, since we want to present the replacement
to the user.

Exit after we have completed that part, but before we
actually start a transaction.
parent 0b9c1430
......@@ -68,21 +68,6 @@ QueueOperation::~QueueOperation()
void QueueOperation::start(AkabeiClient::PackageAction action, QList<Akabei::Package*> packages)
if (packages.isEmpty()) {
QString errorDescription;
if (action == AkabeiClient::Remove) {
errorDescription = QObject::tr("Unable to find the requested package(s) among the installed ones. Quitting...");
else {
errorDescription = QObject::tr("Unable to find the requested package(s). Quitting...");
QTextStream err(stderr);
err << errorDescription << endl;
emit finished();
QTextStream out(stdout);
m_action = action;
......@@ -102,6 +87,12 @@ void QueueOperation::start(AkabeiClient::PackageAction action, QList<Akabei::Pac
if (AkabeiClient::Backend::instance()->queue()->size() == 0) {
out << QObject::tr("Nothing to do") << endl;
emit finished();
out << QObject::tr("Calculating dependencies...") << endl;
......@@ -147,17 +147,6 @@ void SyncOperation::updateSystem()
* Here we avoid an useless initialization of our backends if we already know
* there is no actual operation to be performed.
if (toBeUpgraded.isEmpty()) {
QTextStream out(stdout);
out << QObject::tr(":: System is up-to-date.") << endl;
QueueOperation *op = new QueueOperation(APM::UpdateSystem, m_options, this);
connect(op, SIGNAL(finished()), SLOT(nextOperation()));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment