[packagekit] [PATCH 3/6] Transfer correct restart info while updating packages
Zhang Qiang
qiang.z.zhang at intel.com
Tue Sep 7 01:58:47 PDT 2010
PackageKit zypp backend have not sent restart info to related pacakges,
so application can't get any restart info. This patch fix this bug.
Related bug: http://bugs.meego.com/show_bug.cgi?id=3346
---
backends/zypp/pk-backend-zypp.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 38ecf33..8c02983 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -1631,13 +1631,12 @@ backend_update_packages_thread (PkBackend *backend)
item.status ().setToBeInstalled (zypp::ResStatus::USER);
zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(item.resolvable ());
zypp_get_restart (restart, patch);
+ if (restart != PK_RESTART_ENUM_NONE)
+ pk_backend_require_restart (backend, restart, package_ids[i]);
}
retval = zypp_perform_execution (backend, UPDATE, FALSE);
- if (restart != PK_RESTART_ENUM_NONE)
- pk_backend_require_restart (backend, restart, "A restart is needed");
-
pk_backend_finished (backend);
return retval;
}
--
1.7.1.1
More information about the PackageKit
mailing list