File PackageKit-bnc479107-optional.patch of Package PackageKit
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index deafb5f..7b17bd9 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -992,6 +992,12 @@ backend_update_system_thread (PkBackend *backend)
pk_backend_set_percentage (backend, 80);
std::set<zypp::PoolItem>::iterator cb = candidates->begin (), ce = candidates->end (), ci;
for (ci = cb; ci != ce; ++ci) {
+ //do not install "optional" patches unless explicitly asked for - bnc#479107
+ zypp::ResObject::constPtr res = ci->resolvable();
+ zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(res);
+ if (patch->category () == "optional")
+ continue;
+
// set the status of the update to ToBeInstalled
zypp::ResStatus &status = ci->status ();
status.setToBeInstalled (zypp::ResStatus::USER);