Accepting request 697219 from home:hellcp:branches:GNOME:Factory

- Add zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch
  to fix switch to upgrade mode in the backend

OBS-URL: https://build.opensuse.org/request/show/697219
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=350
This commit is contained in:
Dominique Leuenberger 2019-05-08 15:29:30 +00:00 committed by Git OBS Bridge
parent 7dedea35e0
commit a47a4af7ac
3 changed files with 56 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 23 15:39:37 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>
- Add zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch
to fix switch to upgrade mode in the backend
-------------------------------------------------------------------
Tue Mar 19 08:31:13 UTC 2019 - sckang@suse.com

View File

@ -50,6 +50,7 @@ Patch3: PackageKit-systemd-timers.patch
Patch4: zypp-Switch-to-doUpgrade-solver-when-required-by-distribution.patch
# PATCH-FIX-OPENSUSE PackageKit-remove-polkit-rules.patch bsc#1125434 sckang@suse.com -- Remove polkit rules file
Patch5: PackageKit-remove-polkit-rules.patch
Patch6: zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gobject-introspection-devel
@ -239,6 +240,7 @@ This package provides the upstream default configuration for PackageKit.
%endif
%patch4 -p1
%patch5 -p1
%patch6 -p1
translation-update-upstream
%build

View File

@ -0,0 +1,48 @@
From 8db2a405634b0a98c78a8a1e0ebf339643a645b2 Mon Sep 17 00:00:00 2001
From: Stasiek Michalski <hellcp@opensuse.org>
Date: Thu, 14 Mar 2019 19:48:13 +0100
Subject: [PATCH] [zypp] Perform actions disallowed by update in upgrade mode
---
backends/zypp/pk-backend-zypp.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index b607d5632..13a5c5db1 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -1470,7 +1470,7 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr zypp, PerformType type, gbo
case INSTALL:
case UPDATE:
// for updates we only care for updates
- if (it->status ().isToBeUninstalledDueToUpgrade ())
+ if (it->status ().isToBeUninstalledDueToUpgrade () && !zypp->resolver()->upgradeMode())
continue;
break;
}
@@ -3305,6 +3305,10 @@ backend_update_packages_thread (PkBackendJob *job, GVariant *params, gpointer us
}
}
+ if ( zypp->resolver()->upgradeMode() ) {
+ zypp->resolver()->dupSetAllowVendorChange ( ZConfig::instance().solver_dupAllowVendorChange() );
+ }
+
PoolStatusSaver saver;
for (guint i = 0; package_ids[i]; i++) {
@@ -3323,12 +3327,12 @@ backend_update_packages_thread (PkBackendJob *job, GVariant *params, gpointer us
// patches are special - they are not installed and can't have update candidates
if (sel->kind() != ResKind::patch) {
MIL << "sel " << sel->kind() << " " << sel->ident() << endl;
- if (sel->installedEmpty()) {
+ if (sel->installedEmpty() && !zypp->resolver()->upgradeMode()) {
zypp_backend_finished_error (job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "Package %s is not installed", package_ids[i]);
return;
}
item = sel->updateCandidateObj();
- if (!item) {
+ if (!item && !zypp->resolver()->upgradeMode()) {
zypp_backend_finished_error(job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "There is no update candidate for %s", sel->installedObj().satSolvable().asString().c_str());
return;
}