Ignore source packages when adding them to the PK list

This makes installation of single apps work on openSuse. Previously,
since the source packages has special priority, it was added as the
last item, and it would then get picked for installation, which in
turn would then lead to no functioning application.

Reviewed by Aleix with eyeballs
parent e6cb5c5a
......@@ -288,6 +288,12 @@ void PackageKitBackend::addPackageNotArch(PackageKit::Transaction::Info info, co
void PackageKitBackend::addPackage(PackageKit::Transaction::Info info, const QString &packageId, const QString &summary, bool arch)
{
if(PackageKit::Daemon::packageArch(packageId) == QLatin1String("source")) {
// We do not add source packages, they make little sense here. If source is needed,
// we are going to have to consider that in some other way, some other time
// If we do not ignore them here, e.g. openSuse entirely fails at installing applications
return;
}
const QString packageName = PackageKit::Daemon::packageName(packageId);
QSet<AbstractResource*> r = resourcesByPackageName(packageName);
if (r.isEmpty()) {
......
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