Commit c828cc67 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Use more adequate operation to detect dependencies

We had weird behavior when using a simulated installPackages on some
distributions.
parent 244d0a47
......@@ -529,7 +529,7 @@ void PackageKitBackend::performDetailsFetch()
connect(transaction, &PackageKit::Transaction::errorCode, this, &PackageKitBackend::transactionError);
QSharedPointer<QMap<QString, int>> packageDependencies(new QMap<QString, int>);
auto trans = PackageKit::Daemon::installPackages(ids, PackageKit::Transaction::TransactionFlagSimulate);
auto trans = PackageKit::Daemon::dependsOn(ids);
connect(trans, &PackageKit::Transaction::errorCode, this, &PackageKitBackend::transactionError);
connect(trans, &PackageKit::Transaction::package, this, [packageDependencies](PackageKit::Transaction::Info /*info*/, const QString &packageID, const QString &/*summary*/) {
(*packageDependencies)[packageID] += 1;
......
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