PackageKit/PackageKit-zypp-dont-remove-locked-packages.patch
Bjørn Lie ad67df89f3 Accepting request 1007128 from home:JonathanKang:branches:GNOME:Factory
- Add PackageKit-zypp-dont-remove-locked-packages.patch: zypp:
  Check if packages are locked before removing
  (gh#PackageKit/PackageKit/commit/8649a07bc, bsc#1199895).
- Add PackageKit-zypp-add-repo-in-packageid.patch: zypp: add
  repository data in package id
  (gh#PackageKit/PackageKit/commit/8eb2ef0ae, bsc#1202585).
- Remove PackageKit-zypp-locked-packages.patch: reverted upstream
  (gh#PackageKit/PackageKit/commit/ed3e38043).

OBS-URL: https://build.opensuse.org/request/show/1007128
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=440
2022-09-30 09:00:57 +00:00

18 lines
738 B
Diff

Index: PackageKit-1.2.5/backends/zypp/pk-backend-zypp.cpp
===================================================================
--- PackageKit-1.2.5.orig/backends/zypp/pk-backend-zypp.cpp
+++ PackageKit-1.2.5/backends/zypp/pk-backend-zypp.cpp
@@ -2940,6 +2940,12 @@ backend_remove_packages_thread (PkBacken
return;
}
PoolItem item(solvable);
+ if (item.status ().isLocked ()) {
+ zypp_backend_finished_error (job, PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE,
+ "Failed to remove %s: Locked package.",
+ solvable.name ().c_str ());
+ return;
+ }
if (solvable.isSystem ()) {
item.status ().setToBeUninstalled (ResStatus::USER);
items.push_back (item);