Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package PackageKit for openSUSE:Factory 
checked in at 2021-07-29 21:31:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/PackageKit (Old)
 and      /work/SRC/openSUSE:Factory/.PackageKit.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "PackageKit"

Thu Jul 29 21:31:15 2021 rev:219 rq:909087 version:1.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/PackageKit/PackageKit.changes    2021-04-14 
10:09:31.805346889 +0200
+++ /work/SRC/openSUSE:Factory/.PackageKit.new.1899/PackageKit.changes  
2021-07-29 21:31:54.480775201 +0200
@@ -1,0 +2,9 @@
+Thu Jun 10 17:36:23 UTC 2021 - Dario Faggioli <dfaggi...@suse.com>
+
+- Add PackageKit-dnf-ignore-weak-deps.patch
+  Backport upstream patch (gh#Conan-Kudo/PackageKit/commit#ecd4a96,
+  gh#Conan-Kudo/PackageKit#488) for fixing: dnf backend not honoring
+  "install_weak_deps=False" (gh#dfaggioli/Packagekit#486). See also
+  https://bugzilla.redhat.com/show_bug.cgi?id=1955484
+
+-------------------------------------------------------------------
@@ -89,0 +99,8 @@
+  + PackageKit-CVE-2020-16121.patch
+
+-------------------------------------------------------------------
+Fri Nov  1 02:03:42 UTC 2020 - Jonathan Kang <songchuan.k...@suse.com>
+
+- Add PackageKit-CVE-2020-16121.patch: Information disclosure in
+  InstallFiles, GetFilesLocal and GetDetailsLocal
+  (gh#hughsie/PackageKit/commit/d5e8c597, bsc#1176930).

New:
----
  PackageKit-dnf-ignore-weak-deps.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.lKBUYH/_old  2021-07-29 21:31:55.704773694 +0200
+++ /var/tmp/diff_new_pack.lKBUYH/_new  2021-07-29 21:31:55.708773689 +0200
@@ -64,6 +64,8 @@
 Patch9:         PackageKit-remove-transaction-size-limit.patch
 # PATCH-FIX-UPSTREAM PackageKit-cancel-transaction-if-daemon-disappears.patch 
gh#hughsie/PackageKit#464 sck...@suse.com -- Fix hangs in packagekit-glib2 
client if daemon crashes
 Patch10:        PackageKit-cancel-transaction-if-daemon-disappears.patch
+# PATCH-FIX-UPSTREAM PackageKit-dnf-ignore-weak-deps.patch 
gh#dfaggioli/PackageKit#486 gh#Conan-Kudo/PackageKit#488 
gh#Conan-Kudo/PackageKit/commit/#ecd4a96  -- dnf-backend: honor 
install_weak_deps=False if it is there
+Patch11:        PackageKit-dnf-ignore-weak-deps.patch
 
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++


++++++ PackageKit-dnf-ignore-weak-deps.patch ++++++
>From ecd4a969939855350930511516ae20584bda7fa7 Fri Jun 11 18:53:18 2021 +0200
From: Dario Faggioli <dfaggi...@suse.com>
Date: Fri, Jun 11 18:53:18 2021 +0200

dnf-backend: honor install_weak_deps=False if it is there

Currently, even if we have "install_weak_deps=False" in
/etc/dnf/dnf.conf, `pkcon install` still tries to install all
the recommended packages.

For avoiding that, we need to inform libdnf that we will
solve the goal of the transaction ourselves (by means of the
dnf_transaction_set_dont_solve_goal() API) and then explicitly
set the flag for ignoring the weak dependencies.

This fixes issue #486 and also solve
https://bugzilla.redhat.com/show_bug.cgi?id=1955484

diff -Nru PackageKit-1.2.2_patch/backends/dnf/pk-backend-dnf.c 
PackageKit-1.2.2_patch2/backends/dnf/pk-backend-dnf.c
--- PackageKit-1.2.2_patch/backends/dnf/pk-backend-dnf.c        2021-06-10 
17:55:04.016246418 +0200
+++ PackageKit-1.2.2_patch2/backends/dnf/pk-backend-dnf.c       2021-06-12 
23:39:35.829973392 +0200
@@ -932,6 +932,7 @@
        gboolean ret;
        DnfDb *db;
        DnfState *state_local;
+       DnfGoalActions flags;
        GPtrArray *installs = NULL;
        GPtrArray *pkglist = NULL;
        HyQuery query = NULL;
@@ -1028,7 +1029,10 @@
                } else {
                        hy_goal_upgrade_all (job_data->goal);
                }
-               ret = dnf_goal_depsolve (job_data->goal, DNF_ALLOW_UNINSTALL, 
&error);
+               flags = DNF_ALLOW_UNINSTALL;
+               if (!dnf_context_get_install_weak_deps())
+                       flags |= DNF_IGNORE_WEAK_DEPS;
+               ret = dnf_goal_depsolve (job_data->goal, flags, &error);
                if (!ret) {
                        pk_backend_job_error_code (job, error->code, "%s", 
error->message);
                        goto out;
@@ -2541,6 +2545,7 @@
                            GError **error)
 {
        DnfState *state_local;
+       DnfGoalActions dnf_flags = DNF_ALLOW_UNINSTALL;
        PkBackendDnfJobData *job_data = pk_backend_job_get_user_data (job);
        gboolean ret = TRUE;
        /* allow downgrades for all transaction types */
@@ -2569,6 +2574,15 @@
        dnf_transaction_set_flags (job_data->transaction, flags);
 
        state_local = dnf_state_get_child (state);
+
+       /* we solve the goal ourselves, so we can deal with flags */
+       dnf_transaction_set_dont_solve_goal(job_data->transaction, TRUE);
+       if (!dnf_context_get_install_weak_deps ())
+               dnf_flags |= DNF_IGNORE_WEAK_DEPS;
+       ret = dnf_goal_depsolve (job_data->goal, dnf_flags, error);
+       if (!ret)
+               return FALSE;
+
        ret = dnf_transaction_depsolve (job_data->transaction,
                                        job_data->goal,
                                        state_local,

Reply via email to