Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libdnf for openSUSE:Factory checked 
in at 2022-10-17 14:57:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdnf (Old)
 and      /work/SRC/openSUSE:Factory/.libdnf.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdnf"

Mon Oct 17 14:57:16 2022 rev:30 rq:1011157 version:0.69.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdnf/libdnf.changes    2022-05-06 
18:59:09.865345131 +0200
+++ /work/SRC/openSUSE:Factory/.libdnf.new.2275/libdnf.changes  2022-10-17 
14:57:17.590045852 +0200
@@ -1,0 +2,15 @@
+Sat Oct 15 18:40:24 UTC 2022 - Andreas Stieger <[email protected]>
+
+- libdnf 0.69.0:
+  * Expose librepo max_downloads_per_mirror configuration
+- includes changes from 0.68.0:
+  * context: Support (NEVRA forms, provides, file provides)
+    including globs in the dnf_context_remove func
+  * dnf-context: Disconnect signal handler before dropping file
+    monitor ref
+  * Filter out advisory pkgs with different arch during advisory
+    upgrade, fixes possible problems in dependency resulution
+  * Gracefully handle failure to open repo primary file
+  * Fix listing a repository without cpeid
+
+-------------------------------------------------------------------

Old:
----
  libdnf-0.67.0.tar.gz

New:
----
  libdnf-0.69.0.tar.gz

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

Other differences:
------------------
++++++ libdnf.spec ++++++
--- /var/tmp/diff_new_pack.8c1AoN/_old  2022-10-17 14:57:18.190047004 +0200
+++ /var/tmp/diff_new_pack.8c1AoN/_new  2022-10-17 14:57:18.198047019 +0200
@@ -34,7 +34,7 @@
 %define devname %{name}-devel
 
 Name:           libdnf
-Version:        0.67.0
+Version:        0.69.0
 Release:        0
 Summary:        Library providing C and Python APIs atop libsolv
 License:        LGPL-2.1-or-later

++++++ libdnf-0.67.0.tar.gz -> libdnf-0.69.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/VERSION.cmake 
new/libdnf-0.69.0/VERSION.cmake
--- old/libdnf-0.67.0/VERSION.cmake     2022-04-27 08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/VERSION.cmake     2022-09-09 12:26:26.000000000 +0200
@@ -1,5 +1,5 @@
 set (DEFAULT_LIBDNF_MAJOR_VERSION 0)
-set (DEFAULT_LIBDNF_MINOR_VERSION 67)
+set (DEFAULT_LIBDNF_MINOR_VERSION 69)
 set (DEFAULT_LIBDNF_MICRO_VERSION 0)
 
 if(DEFINED LIBDNF_MAJOR_VERSION)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/docs/release_notes.rst 
new/libdnf-0.69.0/docs/release_notes.rst
--- old/libdnf-0.67.0/docs/release_notes.rst    2022-04-27 08:25:21.000000000 
+0200
+++ new/libdnf-0.69.0/docs/release_notes.rst    2022-09-09 12:26:26.000000000 
+0200
@@ -20,6 +20,32 @@
 ######################
 
 ====================
+0.69.0 Release Notes
+====================
+
+- New features:
+  - Expose librepo max_downloads_per_mirror configuration
+
+====================
+0.68.0 Release Notes
+====================
+
+- New features:
+  - context: Support <package-spec> (NEVRA forms, provides, file provides) 
including globs in the dnf_context_remove func (RhBug:2084602)
+
+- Bug fixes:
+  - dnf-context: Disconnect signal handler before dropping file monitor ref
+  - Filter out advisory pkgs with different arch during advisory upgrade, 
fixes possible problems in dependency resulution (RhBug:2088149)
+  - Gracefully handle failure to open repo primary file
+  - Fix listing a repository without cpeid (RhBug:2066334)
+
+Bugs fixed in 0.68.0:
+
+* :rhbug:`2084602`
+* :rhbug:`2088149`
+* :rhbug:`2066334`
+
+====================
 0.67.0 Release Notes
 ====================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/conf/ConfigMain.cpp 
new/libdnf-0.69.0/libdnf/conf/ConfigMain.cpp
--- old/libdnf-0.67.0/libdnf/conf/ConfigMain.cpp        2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf/conf/ConfigMain.cpp        2022-09-09 
12:26:26.000000000 +0200
@@ -349,6 +349,7 @@
 
     OptionSeconds timeout{30};
     OptionNumber<std::uint32_t> max_parallel_downloads{3, 1};
+    OptionNumber<std::uint32_t> max_downloads_per_mirror{3, 1};
     OptionSeconds metadata_expire{60 * 60 * 48};
     OptionString sslcacert{""};
     OptionBool sslverify{true};
@@ -507,6 +508,7 @@
     owner.optBinds().add("throttle", throttle);
     owner.optBinds().add("timeout", timeout);
     owner.optBinds().add("max_parallel_downloads", max_parallel_downloads);
+    owner.optBinds().add("max_downloads_per_mirror", max_downloads_per_mirror);
     owner.optBinds().add("metadata_expire", metadata_expire);
     owner.optBinds().add("sslcacert", sslcacert);
     owner.optBinds().add("sslverify", sslverify);
@@ -628,6 +630,7 @@
 OptionNumber<float> & ConfigMain::throttle() { return pImpl->throttle; }
 OptionSeconds & ConfigMain::timeout() { return pImpl->timeout; }
 OptionNumber<std::uint32_t> & ConfigMain::max_parallel_downloads() { return 
pImpl->max_parallel_downloads; }
+OptionNumber<std::uint32_t> & ConfigMain::max_downloads_per_mirror() { return 
pImpl->max_downloads_per_mirror; }
 OptionSeconds & ConfigMain::metadata_expire() { return pImpl->metadata_expire; 
}
 OptionString & ConfigMain::sslcacert() { return pImpl->sslcacert; }
 OptionBool & ConfigMain::sslverify() { return pImpl->sslverify; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/conf/ConfigMain.hpp 
new/libdnf-0.69.0/libdnf/conf/ConfigMain.hpp
--- old/libdnf-0.67.0/libdnf/conf/ConfigMain.hpp        2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf/conf/ConfigMain.hpp        2022-09-09 
12:26:26.000000000 +0200
@@ -156,6 +156,7 @@
     OptionNumber<float> & throttle();
     OptionSeconds & timeout();
     OptionNumber<std::uint32_t> & max_parallel_downloads();
+    OptionNumber<std::uint32_t> & max_downloads_per_mirror();
     OptionSeconds & metadata_expire();
     OptionString & sslcacert();
     OptionBool & sslverify();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/conf/ConfigRepo.cpp 
new/libdnf-0.69.0/libdnf/conf/ConfigRepo.cpp
--- old/libdnf-0.67.0/libdnf/conf/ConfigRepo.cpp        2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf/conf/ConfigRepo.cpp        2022-09-09 
12:26:26.000000000 +0200
@@ -61,6 +61,7 @@
     OptionChild<OptionNumber<float> > throttle{mainConfig.throttle()};
     OptionChild<OptionSeconds> timeout{mainConfig.timeout()};
     OptionChild<OptionNumber<std::uint32_t> >  
max_parallel_downloads{mainConfig.max_parallel_downloads()};
+    OptionChild<OptionNumber<std::uint32_t> >  
max_downloads_per_mirror{mainConfig.max_downloads_per_mirror()};
     OptionChild<OptionSeconds> metadata_expire{mainConfig.metadata_expire()};
     OptionNumber<std::int32_t> cost{1000};
     OptionNumber<std::int32_t> priority{99};
@@ -155,6 +156,7 @@
     owner.optBinds().add("throttle", throttle);
     owner.optBinds().add("timeout", timeout);
     owner.optBinds().add("max_parallel_downloads", max_parallel_downloads);
+    owner.optBinds().add("max_downloads_per_mirror", max_downloads_per_mirror);
     owner.optBinds().add("metadata_expire", metadata_expire);
     owner.optBinds().add("cost", cost);
     owner.optBinds().add("priority", priority);
@@ -211,6 +213,7 @@
 OptionChild<OptionNumber<float> > & ConfigRepo::throttle() { return 
pImpl->throttle; }
 OptionChild<OptionSeconds> & ConfigRepo::timeout() { return pImpl->timeout; }
 OptionChild<OptionNumber<std::uint32_t> > & 
ConfigRepo::max_parallel_downloads() { return pImpl->max_parallel_downloads; }
+OptionChild<OptionNumber<std::uint32_t> > & 
ConfigRepo::max_downloads_per_mirror() { return 
pImpl->max_downloads_per_mirror; }
 OptionChild<OptionSeconds> & ConfigRepo::metadata_expire() { return 
pImpl->metadata_expire; }
 OptionNumber<std::int32_t> & ConfigRepo::cost() { return pImpl->cost; }
 OptionNumber<std::int32_t> & ConfigRepo::priority() { return pImpl->priority; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/conf/ConfigRepo.hpp 
new/libdnf-0.69.0/libdnf/conf/ConfigRepo.hpp
--- old/libdnf-0.67.0/libdnf/conf/ConfigRepo.hpp        2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf/conf/ConfigRepo.hpp        2022-09-09 
12:26:26.000000000 +0200
@@ -75,6 +75,7 @@
     OptionChild<OptionNumber<float> > & throttle();
     OptionChild<OptionSeconds> & timeout();
     OptionChild<OptionNumber<std::uint32_t> > & max_parallel_downloads();
+    OptionChild<OptionNumber<std::uint32_t> > & max_downloads_per_mirror();
     OptionChild<OptionSeconds> & metadata_expire();
     OptionNumber<std::int32_t> & cost();
     OptionNumber<std::int32_t> & priority();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/conf/OptionNumber.hpp 
new/libdnf-0.69.0/libdnf/conf/OptionNumber.hpp
--- old/libdnf-0.67.0/libdnf/conf/OptionNumber.hpp      2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf/conf/OptionNumber.hpp      2022-09-09 
12:26:26.000000000 +0200
@@ -25,6 +25,7 @@
 
 #include "Option.hpp"
 
+#include <cstdint>
 #include <functional>
 
 namespace libdnf {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/dnf-context.cpp 
new/libdnf-0.69.0/libdnf/dnf-context.cpp
--- old/libdnf-0.67.0/libdnf/dnf-context.cpp    2022-04-27 08:25:21.000000000 
+0200
+++ new/libdnf-0.69.0/libdnf/dnf-context.cpp    2022-09-09 12:26:26.000000000 
+0200
@@ -209,6 +209,18 @@
 #define GET_PRIVATE(o) (static_cast<DnfContextPrivate 
*>(dnf_context_get_instance_private (o)))
 
 /**
+ * dnf_context_rpmdb_changed_cb:
+ **/
+static void
+dnf_context_rpmdb_changed_cb(GFileMonitor *monitor_,
+                             GFile *file, GFile *other_file,
+                             GFileMonitorEvent event_type,
+                             DnfContext *context)
+{
+    dnf_context_invalidate(context, "rpmdb changed");
+}
+
+/**
  * dnf_context_finalize:
  **/
 static void
@@ -255,8 +267,12 @@
         hy_goal_free(priv->goal);
     if (priv->sack != NULL)
         g_object_unref(priv->sack);
-    if (priv->monitor_rpmdb != NULL)
+    if (priv->monitor_rpmdb != NULL) {
+        g_signal_handlers_disconnect_by_func (priv->monitor_rpmdb,
+                                              (gpointer) 
dnf_context_rpmdb_changed_cb,
+                                              context);
         g_object_unref(priv->monitor_rpmdb);
+    }
 
     G_OBJECT_CLASS(dnf_context_parent_class)->finalize(object);
 }
@@ -1722,18 +1738,6 @@
     priv->user_agent = g_strdup (user_agent);
 }
 
-/**
- * dnf_context_rpmdb_changed_cb:
- **/
-static void
-dnf_context_rpmdb_changed_cb(GFileMonitor *monitor_,
-                             GFile *file, GFile *other_file,
-                             GFileMonitorEvent event_type,
-                             DnfContext *context)
-{
-    dnf_context_invalidate(context, "rpmdb changed");
-}
-
 /* A heuristic; check whether /usr exists in the install root */
 static gboolean
 have_existing_install(DnfContext *context)
@@ -2381,7 +2385,7 @@
 /**
  * dnf_context_install:
  * @context: a #DnfContext instance.
- * @name: A package or group name, e.g. "firefox" or "@gnome-desktop"
+ * @name: A package specification (NEVRA forms, provide, file provide, globs 
supported) e.g. "firefox"
  * @error: A #GError or %NULL
  *
  * Finds a remote package and marks it to be installed.
@@ -2393,10 +2397,9 @@
  * Since: 0.1.0
  **/
 gboolean
-dnf_context_install (DnfContext *context, const gchar *name, GError **error) 
try
+dnf_context_install(DnfContext *context, const gchar *name, GError **error) try
 {
     DnfContextPrivate *priv = GET_PRIVATE (context);
-    g_autoptr(GPtrArray) selector_matches = NULL;
 
     /* create sack and add sources */
     if (priv->sack == NULL) {
@@ -2407,7 +2410,7 @@
 
     g_auto(HySubject) subject = hy_subject_create(name);
     g_auto(HySelector) selector = hy_subject_get_best_selector(subject, 
priv->sack, NULL, FALSE, NULL);
-    selector_matches = hy_selector_matches(selector);
+    g_autoptr(GPtrArray) selector_matches = hy_selector_matches(selector);
     if (selector_matches->len == 0) {
         g_set_error(error,
                     DNF_ERROR,
@@ -2425,12 +2428,12 @@
 /**
  * dnf_context_remove:
  * @context: a #DnfContext instance.
- * @name: A package or group name, e.g. "firefox" or "@gnome-desktop"
+ * @name: A package specification (NEVRA forms, provide, file provide, globs 
supported) e.g. "firefox"
  * @error: A #GError or %NULL
  *
  * Finds an installed package and marks it to be removed.
  *
- * If multiple packages are available then only the oldest package is removed.
+ * If multiple packages are available, all of them will be removed.
  *
  * Returns: %TRUE for success, %FALSE otherwise
  *
@@ -2440,38 +2443,40 @@
 dnf_context_remove(DnfContext *context, const gchar *name, GError **error) try
 {
     DnfContextPrivate *priv = GET_PRIVATE(context);
-    GPtrArray *pkglist;
-    hy_autoquery HyQuery query = NULL;
-    gboolean ret = TRUE;
-    guint i;
 
     /* create sack and add repos */
     if (priv->sack == NULL) {
         dnf_state_reset(priv->state);
-        ret = dnf_context_setup_sack(context, priv->state, error);
-        if (!ret)
+        if (!dnf_context_setup_sack(context, priv->state, error))
             return FALSE;
     }
 
-    /* find installed packages to remove */
-    query = hy_query_create(priv->sack);
-    query->installed();
-    hy_query_filter(query, HY_PKG_NAME, HY_EQ, name);
-    pkglist = hy_query_run(query);
+    libdnf::Query query(priv->sack, 
libdnf::Query::ExcludeFlags::APPLY_EXCLUDES);
+    query.installed();
+    auto ret = query.filterSubject(name, nullptr, false, true, true, true);
+    if (!ret.first) {
+        g_set_error(error,
+                    DNF_ERROR,
+                    DNF_ERROR_PACKAGE_NOT_FOUND,
+                    "No installed package matches '%s'", name);
+        return FALSE;
+    }
+
+    g_autoptr(GPtrArray) packages = query.run();
 
     /* add each package */
-    for (i = 0; i < pkglist->len; i++) {
-        auto pkg = static_cast<DnfPackage *>(g_ptr_array_index(pkglist, i));
+    for (guint i = 0; i < packages->len; i++) {
+        auto pkg = static_cast<DnfPackage *>(g_ptr_array_index(packages, i));
         hy_goal_erase(priv->goal, pkg);
     }
-    g_ptr_array_unref(pkglist);
+
     return TRUE;
 } CATCH_TO_GERROR(FALSE)
 
 /**
  * dnf_context_update:
  * @context: a #DnfContext instance.
- * @name: A package or group name, e.g. "firefox" or "@gnome-desktop"
+ * @name: A package specification (NEVRA forms, provide, file provide, globs 
supported) e.g. "firefox"
  * @error: A #GError or %NULL
  *
  * Finds an installed and remote package and marks it to be updated.
@@ -2495,8 +2500,7 @@
     }
 
     g_auto(HySubject) subject = hy_subject_create(name);
-    g_auto(HySelector) selector = hy_subject_get_best_selector(subject, 
priv->sack, NULL, FALSE,
-                                                               NULL);
+    g_auto(HySelector) selector = hy_subject_get_best_selector(subject, 
priv->sack, NULL, FALSE, NULL);
     g_autoptr(GPtrArray) selector_matches = hy_selector_matches(selector);
     if (selector_matches->len == 0) {
         g_set_error(error,
@@ -2506,8 +2510,14 @@
         return FALSE;
     }
 
-    if (hy_goal_upgrade_selector(priv->goal, selector))
+    int ret = hy_goal_upgrade_selector(priv->goal, selector);
+    if (ret != 0) {
+        g_set_error(error,
+                    DNF_ERROR,
+                    ret,
+                    "Ill-formed Selector '%s'", name);
         return FALSE;
+    }
 
     return TRUE;
 } CATCH_TO_GERROR(FALSE)
@@ -2544,7 +2554,7 @@
 /**
  * dnf_context_distrosync:
  * @context: a #DnfContext instance.
- * @name: A package or group name, e.g. "firefox" or "@gnome-desktop"
+ * @name: A package specification (NEVRA forms, provide, file provide, globs 
supported) e.g. "firefox"
  * @error: A #GError or %NULL
  *
  * Finds an installed and remote package and marks it to be synchronized with 
remote version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/dnf-sack.cpp 
new/libdnf-0.69.0/libdnf/dnf-sack.cpp
--- old/libdnf-0.67.0/libdnf/dnf-sack.cpp       2022-04-27 08:25:21.000000000 
+0200
+++ new/libdnf-0.69.0/libdnf/dnf-sack.cpp       2022-09-09 12:26:26.000000000 
+0200
@@ -777,7 +777,15 @@
             goto out;
         }
         fp_primary = solv_xfopen(primary.c_str(), "r");
-        assert(fp_primary);
+        if (fp_primary == 0) {
+            g_set_error(error,
+                        DNF_ERROR,
+                        DNF_ERROR_INTERNAL_ERROR,
+                        _("Opening repository primary data has failed: %s"),
+                        strerror(errno));
+            retval = FALSE;
+            goto out;
+        }
 
         g_debug("Loading repomd: %s", fn_repomd);
         if (repo_add_repomdxml(repo, fp_repomd, 0)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/repo/Repo.cpp 
new/libdnf-0.69.0/libdnf/repo/Repo.cpp
--- old/libdnf-0.67.0/libdnf/repo/Repo.cpp      2022-04-27 08:25:21.000000000 
+0200
+++ new/libdnf-0.69.0/libdnf/repo/Repo.cpp      2022-09-09 12:26:26.000000000 
+0200
@@ -461,6 +461,8 @@
     handleSetOpt(h.get(), LRO_MAXMIRRORTRIES, 
static_cast<long>(maxMirrorTries));
     handleSetOpt(h.get(), LRO_MAXPARALLELDOWNLOADS,
                      conf->max_parallel_downloads().getValue());
+    handleSetOpt(h.get(), LRO_MAXDOWNLOADSPERMIRROR,
+                     conf->max_downloads_per_mirror().getValue());
 
     LrUrlVars * vars = NULL;
     vars = lr_urlvars_set(vars, MD_TYPE_GROUP_GZ, MD_TYPE_GROUP);
@@ -1031,8 +1033,13 @@
     for (auto elem = yum_repomd->distro_tags; elem; elem = g_slist_next(elem)) 
{
         if (elem->data) {
             auto distroTag = static_cast<LrYumDistroTag *>(elem->data);
-            if (distroTag->tag)
-                distro_tags.emplace_back(distroTag->cpeid, distroTag->tag);
+            if (distroTag->tag) {
+                std::string cpeid_str;
+                if (distroTag->cpeid) {
+                    cpeid_str = distroTag->cpeid;
+                }
+                distro_tags.emplace_back(std::move(cpeid_str), distroTag->tag);
+            }
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/sack/query.cpp 
new/libdnf-0.69.0/libdnf/sack/query.cpp
--- old/libdnf-0.67.0/libdnf/sack/query.cpp     2022-04-27 08:25:21.000000000 
+0200
+++ new/libdnf-0.69.0/libdnf/sack/query.cpp     2022-09-09 12:26:26.000000000 
+0200
@@ -1877,13 +1877,14 @@
         std::vector<Solvable *> candidates;
         std::vector<Solvable *> installed_solvables;
 
-        Id id = -1;
-        while ((id = resultPset->next(id)) != -1) {
-            candidates.push_back(pool_id2solvable(pool, id));
-        }
-        NameArchEVRComparator cmp_key(pool);
-
         if (cmp_type & HY_UPGRADE) {
+            // When doing HY_UPGRADE consider only candidate pkgs that have 
matching Name and Arch with:
+            // * some already installed pkg (in other words: some other 
version of the pkg is already installed)
+            // or
+            // * with pkg that obsoletes some already installed (or to be 
installed in this transaction) pkg
+            // Otherwise a pkg with different Arch than installed can end up 
in upgrade set which is wrong.
+            // It can result in dependency issues, reported as: RhBug:2088149.
+
             Query installed(sack, ExcludeFlags::IGNORE_EXCLUDES);
             installed.installed();
             installed.addFilter(HY_PKG_LATEST_PER_ARCH, HY_EQ, 1);
@@ -1894,6 +1895,35 @@
             }
             std::sort(installed_solvables.begin(), installed_solvables.end(), 
NameArchSolvableComparator);
 
+            Query obsoletes(sack, ExcludeFlags::IGNORE_EXCLUDES);
+            obsoletes.addFilter(HY_PKG, HY_EQ, resultPset);
+            obsoletes.available();
+
+            Query possibly_obsoleted(sack, ExcludeFlags::IGNORE_EXCLUDES);
+            possibly_obsoleted.addFilter(HY_PKG, HY_EQ, resultPset);
+            possibly_obsoleted.addFilter(HY_PKG_UPGRADES, HY_EQ, 1);
+            possibly_obsoleted.queryUnion(installed);
+            possibly_obsoleted.apply();
+
+            obsoletes.addFilter(HY_PKG_OBSOLETES, HY_EQ, 
possibly_obsoleted.runSet());
+            obsoletes.apply();
+            Id obsoleted_id = -1;
+            // Add to candidates resultPset pkgs that obsolete some installed 
(or to be installed in this transaction) pkg
+            while ((obsoleted_id = 
obsoletes.pImpl->result->next(obsoleted_id)) != -1) {
+                Solvable * s = pool_id2solvable(pool, obsoleted_id);
+                candidates.push_back(s);
+            }
+
+            Id id = -1;
+            // Add to candidates resultPset pkgs that match name and arch with 
some already installed pkg
+            while ((id = resultPset->next(id)) != -1) {
+                Solvable * s = pool_id2solvable(pool, id);
+                auto low = std::lower_bound(installed_solvables.begin(), 
installed_solvables.end(), s, NameArchSolvableComparator);
+                if (low != installed_solvables.end() && s->name == 
(*low)->name && s->arch == (*low)->arch) {
+                    candidates.push_back(s);
+                }
+            }
+
             // Apply security filters only to packages with lower priority - 
to unify behaviour upgrade
             // and upgrade-minimal
             std::sort(candidates.begin(), candidates.end(), 
NameArchPrioritySolvableKey);
@@ -1915,7 +1945,14 @@
                 }
             }
             std::swap(candidates, priority_candidates);
+        } else {
+            Id id = -1;
+            while ((id = resultPset->next(id)) != -1) {
+                candidates.push_back(pool_id2solvable(pool, id));
+            }
         }
+
+        NameArchEVRComparator cmp_key(pool);
         std::sort(candidates.begin(), candidates.end(), cmp_key);
         for (auto & advisoryPkg : pkgs) {
             if (cmp_type & HY_UPGRADE) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf/utils/sqlite3/Sqlite3.hpp 
new/libdnf-0.69.0/libdnf/utils/sqlite3/Sqlite3.hpp
--- old/libdnf-0.67.0/libdnf/utils/sqlite3/Sqlite3.hpp  2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf/utils/sqlite3/Sqlite3.hpp  2022-09-09 
12:26:26.000000000 +0200
@@ -27,6 +27,7 @@
 
 #include <sqlite3.h>
 
+#include <cstdint>
 #include <map>
 #include <memory>
 #include <stdexcept>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/libdnf.spec 
new/libdnf-0.69.0/libdnf.spec
--- old/libdnf-0.67.0/libdnf.spec       2022-04-27 08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/libdnf.spec       2022-09-09 12:26:26.000000000 +0200
@@ -4,7 +4,7 @@
 %global dnf_conflict 4.11.0
 %global swig_version 3.0.12
 %global libdnf_major_version 0
-%global libdnf_minor_version 67
+%global libdnf_minor_version 69
 %global libdnf_micro_version 0
 
 %define __cmake_in_source_build 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/python/hawkey/tests/tests/test_repo.py 
new/libdnf-0.69.0/python/hawkey/tests/tests/test_repo.py
--- old/libdnf-0.67.0/python/hawkey/tests/tests/test_repo.py    2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/python/hawkey/tests/tests/test_repo.py    2022-09-09 
12:26:26.000000000 +0200
@@ -40,6 +40,16 @@
         with self.assertRaises(TypeError):
             r2.cost = '4'
 
+    def test_max_parallel_downloads(self):
+        r = hawkey.Repo("fog")
+        r.max_parallel_downloads = 10
+        self.assertEqual(10, r.max_parallel_downloads)
+
+    def test_max_downloads_per_mirror(self):
+        r = hawkey.Repo("fog")
+        r.max_downloads_per_mirror = 10
+        self.assertEqual(10, r.max_downloads_per_mirror)
+
     def test_str_assignment(self):
         r = hawkey.Repo('fog')
         with self.assertRaises(TypeError):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdnf-0.67.0/tests/libdnf/dnf-self-test.c 
new/libdnf-0.69.0/tests/libdnf/dnf-self-test.c
--- old/libdnf-0.67.0/tests/libdnf/dnf-self-test.c      2022-04-27 
08:25:21.000000000 +0200
+++ new/libdnf-0.69.0/tests/libdnf/dnf-self-test.c      2022-09-09 
12:26:26.000000000 +0200
@@ -1212,12 +1212,12 @@
 int
 main(int argc, char **argv)
 {
-    g_setenv("G_MESSAGES_DEBUG", "all", FALSE);
+    g_assert(g_setenv("G_MESSAGES_DEBUG", "all", FALSE));
     /* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */
     /* Also because we do valgrind testing and there are vast array of
      * "leaks" when we load gio vfs modules.
      */
-    g_setenv ("GIO_USE_VFS", "local", TRUE);
+    g_assert(g_setenv ("GIO_USE_VFS", "local", TRUE));
 
     g_test_init(&argc, &argv, NULL);
 
@@ -1226,7 +1226,7 @@
     g_log_set_always_fatal (G_LOG_FATAL_MASK);
 
     /* Sets a variable to replace in repository configurations. */
-    g_setenv("DNF_VAR_testdatadir", TESTDATADIR, TRUE);
+    g_assert(g_setenv("DNF_VAR_testdatadir", TESTDATADIR, TRUE));
 
     /* tests go here */
     g_test_add_func("/libdnf/repo_loader{gpg-asc}", 
dnf_repo_loader_gpg_asc_func);

Reply via email to