Accepting request 738192 from home:JonathanKang:branches:GNOME:Factory
- Remove zypp-Switch-to-doUpgrade-solver-when-required-by-distribution.patch, rebase zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch, add PackageKit-zypp-dont-set-upgrade-mode-on-updating-specific-packages.patch: zypp: Don't set upgrade mode in update-packages (gh#hughsie/PackageKit#345). OBS-URL: https://build.opensuse.org/request/show/738192 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=362
This commit is contained in:
parent
2aa470b250
commit
e3e4ccdba1
@ -0,0 +1,34 @@
|
||||
From 44a2887864b7c0ac54d342126069b6a7ff3c5822 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Kang <jonathankang@gnome.org>
|
||||
Date: Mon, 14 Oct 2019 15:17:34 +0800
|
||||
Subject: [PATCH] zypp: Don't set upgrade mode in update-packages
|
||||
|
||||
update-packages does two things: 1. update the whole system. 2. update
|
||||
specific packages. setting upgrade mode to TRUE in update-packages can
|
||||
lead to inability to update specific packages, as the resolver always
|
||||
trys to upgrade the whole system in upgrade mode.
|
||||
|
||||
Since calling "pkcon update" in Tumbleweed invokes get-updates where
|
||||
upgrade mode is set to TRUE, we don't have to set it in update-packages
|
||||
anymore. Besides, we should reset upgrade mode to FALSE at the end of
|
||||
update-packages to make sure not to block further actions.
|
||||
---
|
||||
backends/zypp/pk-backend-zypp.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
|
||||
index 4885df6f5..fbaf5413e 100644
|
||||
--- a/backends/zypp/pk-backend-zypp.cpp
|
||||
+++ b/backends/zypp/pk-backend-zypp.cpp
|
||||
@@ -3391,6 +3391,8 @@ backend_update_packages_thread (PkBackendJob *job, GVariant *params, gpointer us
|
||||
}
|
||||
|
||||
zypp_perform_execution (job, zypp, UPDATE, FALSE, transaction_flags);
|
||||
+
|
||||
+ zypp->resolver()->setUpgradeMode(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 07:00:32 UTC 2019 - Jonathan Kang <sckang@suse.com>
|
||||
|
||||
- Remove zypp-Switch-to-doUpgrade-solver-when-required-by-distribution.patch,
|
||||
rebase zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch,
|
||||
add PackageKit-zypp-dont-set-upgrade-mode-on-updating-specific-packages.patch:
|
||||
zypp: Don't set upgrade mode in update-packages
|
||||
(gh#hughsie/PackageKit#345).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 9 06:19:11 UTC 2019 - Jonathan Kang <sckang@suse.com>
|
||||
|
||||
|
@ -47,18 +47,19 @@ Patch1: PackageKit-return-on-transactions-going-backwards.patch
|
||||
Patch2: PackageKit-add-mutex-lock-to-protect-backend-priv-eulas.patch
|
||||
# PATCH-FEATURE-OPENSUSE PackageKit-systemd-timers.patch bsc#1115410 sckang@suse.com -- Migrate from cron to systemd timers
|
||||
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
|
||||
Patch4: PackageKit-remove-polkit-rules.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-zypp-fix-newest-filter.patch bsc#1137019 gh#hughsie/PackageKit#329 sckang@suse.com -- zypp: Emit installed package for newest filter
|
||||
Patch7: PackageKit-zypp-fix-newest-filter.patch
|
||||
Patch5: PackageKit-zypp-fix-newest-filter.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-zypp-fix-what-provides-newest-filter.patch bsc#984865, gh#hughsie/PackageKit#335 sckang@suse.com -- zypp: Add support for newest filter in what-provides
|
||||
Patch8: PackageKit-zypp-fix-what-provides-newest-filter.patch
|
||||
Patch6: PackageKit-zypp-fix-what-provides-newest-filter.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-drop-gtk2.patch gh#/hughsie/PackageKit#333 - Port away from gtk2 dependency
|
||||
Patch9: PackageKit-drop-gtk2.patch
|
||||
Patch7: PackageKit-drop-gtk2.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-zypp-get-updates-dup-or-up.patch gh#hughsie/PackageKit#343 sckang@suse.com -- zypp: Fix get-updates in Tumbleweed
|
||||
Patch10: PackageKit-zypp-get-updates-dup-or-up.patch
|
||||
Patch8: PackageKit-zypp-get-updates-dup-or-up.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-zypp-dont-set-upgrade-mode-on-updating-specific-packages.patch gh#hughsie/PackageKit#345 sckang@suse.com -- zypp: Don't set upgrade mode in update-packages
|
||||
Patch9: PackageKit-zypp-dont-set-upgrade-mode-on-updating-specific-packages.patch
|
||||
Patch10: zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch
|
||||
|
||||
BuildRequires: autoconf-archive
|
||||
BuildRequires: fdupes
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 98d8547cc3abfbb2a1fb2aad1f11f05a9d394636 Mon Sep 17 00:00:00 2001
|
||||
From: Stasiek Michalski <hellcp@opensuse.org>
|
||||
Date: Thu, 24 Jan 2019 16:14:39 +0100
|
||||
Subject: [PATCH] zypp: Switch to doUpgrade solver when required by
|
||||
distribution
|
||||
|
||||
---
|
||||
backends/zypp/pk-backend-zypp.cpp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp
|
||||
===================================================================
|
||||
--- PackageKit-1.1.12.orig/backends/zypp/pk-backend-zypp.cpp
|
||||
+++ PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp
|
||||
@@ -3297,6 +3297,14 @@ backend_update_packages_thread (PkBacken
|
||||
ResPool pool = zypp_build_pool (zypp, TRUE);
|
||||
PkRestartEnum restart = PK_RESTART_ENUM_NONE;
|
||||
|
||||
+ for ( const PoolItem & pi : pool.byKind<Product>() ) {
|
||||
+ static const Capability indicator( "product-update()", Rel::EQ, "dup" );
|
||||
+ if ( pi->asKind<Product>()->referencePackage().provides().matches( indicator ) ) {
|
||||
+ zypp->resolver()->setUpgradeMode(TRUE);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
PoolStatusSaver saver;
|
||||
|
||||
for (guint i = 0; package_ids[i]; i++) {
|
@ -11,7 +11,7 @@ Index: PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp
|
||||
===================================================================
|
||||
--- PackageKit-1.1.12.orig/backends/zypp/pk-backend-zypp.cpp
|
||||
+++ PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp
|
||||
@@ -1470,7 +1470,7 @@ zypp_perform_execution (PkBackendJob *jo
|
||||
@@ -1509,7 +1509,7 @@ zypp_perform_execution (PkBackendJob *jo
|
||||
case INSTALL:
|
||||
case UPDATE:
|
||||
// for updates we only care for updates
|
||||
@ -20,18 +20,18 @@ Index: PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
@@ -3305,6 +3305,10 @@ backend_update_packages_thread (PkBacken
|
||||
}
|
||||
@@ -3347,6 +3347,10 @@ backend_update_packages_thread (PkBacken
|
||||
}
|
||||
|
||||
ResPool pool = zypp_build_pool (zypp, TRUE);
|
||||
PkRestartEnum restart = PK_RESTART_ENUM_NONE;
|
||||
+
|
||||
+ 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 (PkBacken
|
||||
@@ -3366,12 +3370,12 @@ backend_update_packages_thread (PkBacken
|
||||
// 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;
|
||||
|
Loading…
Reference in New Issue
Block a user