File PackageKit-zypp-ensure-ResPool-before-is_tumbleweed.patch of Package PackageKit
Index: PackageKit-1.1.13/backends/zypp/pk-backend-zypp.cpp
===================================================================
--- PackageKit-1.1.13.orig/backends/zypp/pk-backend-zypp.cpp
+++ PackageKit-1.1.13/backends/zypp/pk-backend-zypp.cpp
@@ -3422,7 +3422,6 @@ upgrade_system (PkBackendJob *job,
if (!zypp_refresh_cache (job, zypp, FALSE)) {
return;
}
- zypp_build_pool (zypp, TRUE);
zypp_get_updates (job, zypp, candidates);
if (candidates.empty ()) {
pk_backend_job_error_code (job, PK_ERROR_ENUM_NO_DISTRO_UPGRADE_DATA,
@@ -3434,8 +3433,6 @@ upgrade_system (PkBackendJob *job,
zypp->resolver ()->dupSetAllowVendorChange (ZConfig::instance ().solver_dupAllowVendorChange ());
zypp->resolver ()->doUpgrade ();
- PoolStatusSaver saver;
-
zypp_perform_execution (job, zypp, UPGRADE_SYSTEM, FALSE, transaction_flags);
zypp->resolver ()->setUpgradeMode (FALSE);
@@ -3458,16 +3455,15 @@ backend_update_packages_thread (PkBacken
return;
}
+ ResPool pool = zypp_build_pool (zypp, TRUE);
+ PkRestartEnum restart = PK_RESTART_ENUM_NONE;
+ PoolStatusSaver saver;
+
if (is_tumbleweed ()) {
upgrade_system (job, zypp, transaction_flags);
return;
}
- ResPool pool = zypp_build_pool (zypp, TRUE);
- PkRestartEnum restart = PK_RESTART_ENUM_NONE;
-
- PoolStatusSaver saver;
-
for (guint i = 0; package_ids[i]; i++) {
sat::Solvable solvable = zypp_get_package_by_id (package_ids[i]);