Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Lachu:SystemServices
Lachu-PackageKit
0042-Repair-gnome-software-bug-exist-because-it...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0042-Repair-gnome-software-bug-exist-because-it-works-in-.patch of Package Lachu-PackageKit
From 7774537108d0e1dc632f64c9b4d44f8d607715ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Lach?= <slawek@lach.art.pl> Date: Sat, 17 Jul 2021 12:22:15 +0200 Subject: [PATCH 42/46] - Repair gnome-software bug exist, because it works in interactive mode - Repair bug made gnome-software think package is installed properly, but it not --- backends/zypp/pk-backend-zypp.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp index d75069ed2..be0a60012 100644 --- a/backends/zypp/pk-backend-zypp.cpp +++ b/backends/zypp/pk-backend-zypp.cpp @@ -126,6 +126,7 @@ struct backend_job_private { bool interactively_res_init; bool resolution_done; bool init; + bool error; struct msg_proc_helper *msg_proc_helper; @@ -1978,7 +1979,7 @@ static void dependency_error(const char *message_prefix, { const char *buffer = message_prefix; - if (! pk_backend_job_get_interactive(msg_proc->job)) { + //if (! pk_backend_job_get_interactive(msg_proc->job)) { ResolverProblemList problems = msg_proc->msg_proc_helper->resolver->problems (); gchar * emsg = NULL, * tempmsg = NULL; @@ -2002,9 +2003,9 @@ static void dependency_error(const char *message_prefix, pk_backend_job_error_code (msg_proc->job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "%s:%s", buffer, emsg); g_free (emsg); + msg_proc->error = 1; - - } + //} } static gboolean @@ -2249,9 +2250,15 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr zypp, PerformType type, gbo PkBackend *backend = PK_BACKEND(pk_backend_job_get_backend(job)); - + struct backend_job_private *rjob = (struct backend_job_private*) pk_backend_job_get_priv_data (job); + + if (rjob->error) { + + goto exit; + } + try { try { if (force) @@ -2289,6 +2296,7 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr zypp, PerformType type, gbo rjob = new (struct backend_job_private)(); rjob->init = true; + rjob->error = false; pk_backend_job_set_priv_data(job, rjob); @@ -2325,6 +2333,7 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr zypp, PerformType type, gbo } + rjob->resolution_done = false; transaction_problems->problems = problems; // rjob->to_install =std::list<std::string>(); @@ -3867,6 +3876,8 @@ backend_install_files_thread (PkBackendJob *job, GVariant *params, gpointer user if (!zypp_perform_execution (job, zypp, INSTALL, FALSE, transaction_flags)) { + + if (! rjob->error) pk_backend_job_error_code (job, PK_ERROR_ENUM_LOCAL_INSTALL_FAILED, "Could not install the rpm-file."); } -- 2.32.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor