Hello community,

here is the log from the commit of package libdnf for openSUSE:Factory checked 
in at 2019-02-20 14:10:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdnf (Old)
 and      /work/SRC/openSUSE:Factory/.libdnf.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdnf"

Wed Feb 20 14:10:46 2019 rev:6 rq:674418 version:0.24.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdnf/libdnf.changes    2018-08-20 
16:21:36.561008042 +0200
+++ /work/SRC/openSUSE:Factory/.libdnf.new.28833/libdnf.changes 2019-02-20 
14:10:48.114950045 +0100
@@ -1,0 +2,39 @@
+Wed Feb 13 08:38:39 UTC 2019 - Neal Gompa <[email protected]>
+
+- Fix cmake macro pointer to source tree
+
+-------------------------------------------------------------------
+Thu Feb  7 06:20:08 UTC 2019 - Neal Gompa <[email protected]>
+
+- Switch default reposdir to /etc/dnf/repos.d
+  * Add patch: libdnf-0.24.1-Switch-default-reposdir-to-etc-dnf-repos.d.patch
+
+-------------------------------------------------------------------
+Tue Feb  5 14:29:38 UTC 2019 - Neal Gompa <[email protected]>
+
+- Rebase to version 0.24.1
+  + Add support for RH/Fedora modules
+  + Add plugin support (unstable API)
+  + Add zchunk support
+  + Migrate from YUMDB to new SWDB
+  + Rewrite into C++
+- Drop Python 2 bindings
+- Backport fixes from upstream eliminate various bugs
+  * 0001-Reset-callback-to-NULL-RhBug-1637923.patch
+  * 0002-reldep-list-Add-glib-AUTOPTR-cleanup.patch
+  * 0003-swdb-Put-Swdb-constructors-together.patch
+  * 0004-utils-Drop-empty-else-block.patch
+  * 0005-transformer-Fix-minor-docstring-typo.patch
+  * 0006-repo-Squash-Wmaybe-uninitialized-warning.patch
+  * 0007-transaction-Consistently-use-the-same-swdb-variable.patch
+  * 0008-transaction-Minor-syntax-tweak.patch
+- Add proposed patches for improving zchunk support
+  * 0101-Zchunk-configuration-flags-were-backwards-so-setting.patch
+  * 0102-hy_repos-weren-t-being-filled-properly-when-using-zc.patch
+- Refresh patch for linking to static libsolvext
+  * Remove patch: libdnf-0.9.3-with-static-libsolvext.patch
+  * Add patch: libdnf-0.24.1-with-static-libsolvext.patch
+- Drop patch merged in upstream libdnf
+  * 0001-Add-multiversion-kernel-as-a-recognized-installonlyp.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-Add-multiversion-kernel-as-a-recognized-installonlyp.patch
  libdnf-0.11.1.tar.gz
  libdnf-0.9.3-with-static-libsolvext.patch

New:
----
  0001-Reset-callback-to-NULL-RhBug-1637923.patch
  0002-reldep-list-Add-glib-AUTOPTR-cleanup.patch
  0003-swdb-Put-Swdb-constructors-together.patch
  0004-utils-Drop-empty-else-block.patch
  0005-transformer-Fix-minor-docstring-typo.patch
  0006-repo-Squash-Wmaybe-uninitialized-warning.patch
  0007-transaction-Consistently-use-the-same-swdb-variable.patch
  0008-transaction-Minor-syntax-tweak.patch
  0101-Zchunk-configuration-flags-were-backwards-so-setting.patch
  0102-hy_repos-weren-t-being-filled-properly-when-using-zc.patch
  libdnf-0.24.1-Switch-default-reposdir-to-etc-dnf-repos.d.patch
  libdnf-0.24.1-with-static-libsolvext.patch
  libdnf-0.24.1.tar.gz

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

Other differences:
------------------
++++++ libdnf.spec ++++++
--- /var/tmp/diff_new_pack.xZ5eNy/_old  2019-02-20 14:10:48.614949879 +0100
+++ /var/tmp/diff_new_pack.xZ5eNy/_new  2019-02-20 14:10:48.614949879 +0100
@@ -2,7 +2,7 @@
 # spec file for package libdnf
 #
 # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
-# Copyright (c) 2018 Neal Gompa <[email protected]>.
+# Copyright (c) 2019 Neal Gompa <[email protected]>.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,10 @@
 #
 
 
-%global libsolv_version 0.6.28
+%global libsolv_version 0.6.34
+%global libmodulemd_version 1.6.1
+%global librepo_version 1.9.3
+%global swig_version 3.0.12
 
 # Keep tests switched off for now, it bombs out on SUSE
 %bcond_with check
@@ -25,36 +28,46 @@
 # Keep valgrind tests switched off for now
 %bcond_with valgrind
 
-%{!?make_build: %global make_build %{__make} -O %{?_smp_mflags}}
-%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
-
-%define somajor 1
-%define girapi %{somajor}.0
+%define somajor 2
 %define libname %{name}%{somajor}
-%define girname typelib-1_0-Dnf-%{somajor}_0
 %define devname %{name}-devel
 
 Name:           libdnf
-Version:        0.11.1
+Version:        0.24.1
 Release:        0
 Summary:        Library providing simplified C and Python API to libsolv
-License:        LGPL-2.0+
+License:        LGPL-2.1-or-later
 Group:          System/Packages
 Url:            https://github.com/rpm-software-management/%{name}
 Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
 
-# PATCH-FIX-UPSTREAM: Ensure SUSE kernel packages are recognized properly
-# Proposed upstream: https://github.com/rpm-software-management/libdnf/pull/400
-Patch0001:      0001-Add-multiversion-kernel-as-a-recognized-installonlyp.patch
-
-# PATCH-FIX-OPENSUSE libdnf-0.9.3-with-static-libsolvext.patch  
[email protected] -- Fix libdnf build with static libsolvext
-Patch1000:      libdnf-0.9.3-with-static-libsolvext.patch
+# PATCH-FIX-UPSTREAM: Backports from upstream
+Patch0001:      0001-Reset-callback-to-NULL-RhBug-1637923.patch
+Patch0002:      0002-reldep-list-Add-glib-AUTOPTR-cleanup.patch
+Patch0003:      0003-swdb-Put-Swdb-constructors-together.patch
+Patch0004:      0004-utils-Drop-empty-else-block.patch
+Patch0005:      0005-transformer-Fix-minor-docstring-typo.patch
+Patch0006:      0006-repo-Squash-Wmaybe-uninitialized-warning.patch
+Patch0007:      0007-transaction-Consistently-use-the-same-swdb-variable.patch
+Patch0008:      0008-transaction-Minor-syntax-tweak.patch
+
+# PATCH-FIX-UPSTREAM: Proposed fixes for zchunk
+# From: https://github.com/rpm-software-management/libdnf/pull/663
+Patch0101:      0101-Zchunk-configuration-flags-were-backwards-so-setting.patch
+Patch0102:      0102-hy_repos-weren-t-being-filled-properly-when-using-zc.patch
+
+# PATCH-FIX-OPENSUSE: Fix libdnf build with static libsolvext
+Patch1000:      libdnf-0.24.1-with-static-libsolvext.patch
+# PATCH-FIX-OPENSUSE: Switch default reposdir to /etc/dnf/repos.d
+Patch1001:      libdnf-0.24.1-Switch-default-reposdir-to-etc-dnf-repos.d.patch
 
 BuildRequires:  cmake
 BuildRequires:  gcc
+BuildRequires:  gcc-c++
 BuildRequires:  libsolv-devel >= %{libsolv_version}
+BuildRequires:  gpgme-devel
 BuildRequires:  pkgconfig(check)
-BuildRequires:  pkgconfig(librepo)
+BuildRequires:  pkgconfig(librepo) >= %{librepo_version}
 %if %{with valgrind}
 BuildRequires:  valgrind
 %endif
@@ -63,6 +76,14 @@
 BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.46.0
 BuildRequires:  pkgconfig(gobject-introspection-1.0)
 BuildRequires:  pkgconfig(gtk-doc)
+BuildRequires:  pkgconfig(sqlite3)
+BuildRequires:  pkgconfig(json-c)
+BuildRequires:  pkgconfig(cppunit)
+BuildRequires:  pkgconfig(libcrypto)
+BuildRequires:  pkgconfig(modulemd) >= %{libmodulemd_version}
+BuildRequires:  pkgconfig(smartcols)
+
+# libsolv specific BRs
 BuildRequires:  pkgconfig(liblzma)
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(libzstd)
@@ -76,25 +97,28 @@
 %package -n %{libname}
 Summary:        Library providing simplified interface to libsolv
 Group:          System/Libraries
+Recommends:     %{name}-lang = %{version}-%{release}
+# gobject-introspection is no longer used
+Obsoletes:      typelib-1_0-Dnf-1_0 < 0.24.1
 
 %description -n %{libname}
-This library provides a simple interface to libsolv and is currently
-used by PackageKit and rpm-ostree.
+This library provides a simple interface to libsolv and a high-level
+RPM package manager library interface.
 
-%package -n %{girname}
-Summary:        GObject Introspection interface description for libdnf
-Group:          System/Libraries
+%package -n python3-%{name}
+Summary:        Python 3 bindings for the libdnf library
+Group:          Development/Libraries/Python
 Requires:       %{libname}%{?_isa} = %{version}-%{release}
+BuildRequires:  python3-devel
+BuildRequires:  python3-Sphinx
+BuildRequires:  swig >= %{swig_version}
 
-%description -n %{girname}
-This packages provides the GObject Introspection interface description
-for %{name}, enabling the usage of libdnf in programming languages
-that support it.
+%description -n python3-%{name}
+This package provides the Python 3 bindings for the libdnf library.
 
 %package -n %{devname}
 Summary:        Development files for %{name}
 Group:          Development/Libraries/C and C++
-Requires:       %{girname}%{?_isa} = %{version}-%{release}
 Requires:       %{libname}%{?_isa} = %{version}-%{release}
 
 %description -n %{devname}
@@ -104,54 +128,44 @@
 %package -n hawkey-man
 Summary:        Documentation for the hawkey Python bindings
 Group:          Documentation/Man
-BuildRequires:  python-Sphinx
-BuildRequires:  python-nose
+BuildRequires:  python3-Sphinx
+BuildRequires:  python3-nose
 BuildArch:      noarch
 
 %description -n hawkey-man
 This package provides the man pages for the hawkey Python bindings.
 
-%package -n python2-hawkey
-Summary:        Python 2 bindings for the hawkey interface
-Group:          Development/Libraries/Python
-Provides:       python-hawkey = %{version}-%{release}
-BuildRequires:  python-devel
-BuildRequires:  python-nose
-Requires:       %{libname}%{?_isa} = %{version}-%{release}
-Requires:       hawkey-man = %{version}-%{release}
-
-%description -n python2-hawkey
-This package provides the Python 2 bindings for %{name} through
-the hawkey interface.
-
 %package -n python3-hawkey
 Summary:        Python 3 bindings for the hawkey interface
 Group:          Development/Libraries/Python
 BuildRequires:  python3-devel
 BuildRequires:  python3-nose
+Requires:       python3-%{name}%{?_isa} = %{version}-%{release}
 Requires:       %{libname}%{?_isa} = %{version}-%{release}
-Requires:       hawkey-man = %{version}-%{release}
+Recommends:     hawkey-man = %{version}-%{release}
+# DNF older than 4.0.0 isn't compatible with this
+Conflicts:      python3-dnf < 4.0.0
+# Python 2 subpackage has been dropped
+Obsoletes:      python2-hawkey < 0.24.1
 
 %description -n python3-hawkey
 This package provides the Python 3 bindings for %{name} through
 the hawkey interface.
 
+%lang_package
+
+
 %prep
 %autosetup -p1
 
-mkdir build-py2
-mkdir build-py3
+# Fix sphinx-build run...
+sed -e "s/sphinx-build-3/sphinx-build-%{python3_version}/" -i 
docs/hawkey/CMakeLists.txt
+
 
 %build
-pushd build-py2
-  %cmake %{!?with_valgrind:-DDISABLE_VALGRIND=1} ../../
-  %make_build
-popd
+%cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} 
%{!?with_valgrind:-DDISABLE_VALGRIND=1}
+%make_build
 
-pushd build-py3
-  %cmake -DPYTHON_DESIRED:str=3 -DWITH_GIR=0 -DWITH_MAN=0 -Dgtkdoc=0 
%{!?with_valgrind:-DDISABLE_VALGRIND=1} ../../
-  %make_build
-popd
 
 %if %{with check}
 %check
@@ -166,53 +180,45 @@
 ERROR
         exit 1
 fi
-pushd build-py2/build
+pushd build
   make ARGS="-V" test
 popd
 
-# FOR THE PYTHON 3 BUILD
-# Run just the Python tests, not all of them, since
-# we have coverage of the core from the first build
-pushd build-py3/build/python/hawkey/tests
-  make ARGS="-V" test
-popd
 %endif
 
+
 %install
-pushd build-py2/build
+pushd build
   %make_install
 popd
 
-pushd build-py3/build
-  %make_install
-popd
+%find_lang %{name}
+
 
 %post -n %{libname} -p /sbin/ldconfig
 
 %postun -n %{libname} -p /sbin/ldconfig
 
-%files -n %{libname}
+%files -n %{libname} -f %{name}.lang
 %license COPYING
 %doc README.md AUTHORS
 %{_libdir}/%{name}.so.%{somajor}
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/plugins
+%{_libdir}/%{name}/plugins/README
 
-%files -n %{girname}
-%{_libdir}/girepository-1.0/Dnf-%{girapi}.typelib
+%files -n python3-%{name}
+%{python3_sitearch}/%{name}/
 
 %files -n %{devname}
 %{_libdir}/%{name}.so
 %{_libdir}/pkgconfig/%{name}.pc
 %{_includedir}/%{name}/
-%doc %{_datadir}/gtk-doc/html/%{name}/
-%{_datadir}/gtk-doc/html/%{name}/*
-%{_datadir}/gir-1.0/Dnf-*.gir
+%{_datadir}/gtk-doc/html/%{name}/
 
 %files -n hawkey-man
 %{_mandir}/man3/hawkey.3*
 
-%files -n python2-hawkey
-%{python2_sitearch}/hawkey/
-
 %files -n python3-hawkey
 %{python3_sitearch}/hawkey/
 

++++++ 0001-Reset-callback-to-NULL-RhBug-1637923.patch ++++++
>From a0afd8443430554ce00c6a3952e6be05f7c7d9ca Mon Sep 17 00:00:00 2001
From: amatej <[email protected]>
Date: Tue, 11 Dec 2018 12:44:21 +0100
Subject: [PATCH 1/8] Reset callback to NULL (RhBug:1637923)

It prevents crash of PackageKit
 #0 repo_mirrorlist_failure_cb at 
/usr/src/debug/libdnf-0.20.0-1.fc29.x86_64/libdnf/dnf-repo.cpp:1641
 #1 check_transfer_statuses at 
/usr/src/debug/librepo-1.9.1-1.fc29.x86_64/librepo/downloader.c:1718
 #2 lr_perform at 
/usr/src/debug/librepo-1.9.1-1.fc29.x86_64/librepo/downloader.c:1956
 #3 lr_download at 
/usr/src/debug/librepo-1.9.1-1.fc29.x86_64/librepo/downloader.c:2083
 #4 lr_download_target at 
/usr/src/debug/librepo-1.9.1-1.fc29.x86_64/librepo/downloader.c:2187
 #5 lr_yum_download_url at 
/usr/src/debug/librepo-1.9.1-1.fc29.x86_64/librepo/yum.c:491
 #6 lr_download_url at 
/usr/src/debug/librepo-1.9.1-1.fc29.x86_64/librepo/downloader.c:2197
 #7 dnf_repo_download_import_public_key at 
/usr/src/debug/libdnf-0.20.0-1.fc29.x86_64/libdnf/dnf-repo.cpp:1616
 #8 dnf_repo_update at 
/usr/src/debug/libdnf-0.20.0-1.fc29.x86_64/libdnf/dnf-repo.cpp:1758
 #9 dnf_sack_add_repo at 
/usr/src/debug/libdnf-0.20.0-1.fc29.x86_64/libdnf/dnf-sack.cpp:2086
---
 libdnf/dnf-repo.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp
index a96ce1c7..1cf762b1 100644
--- a/libdnf/dnf-repo.cpp
+++ b/libdnf/dnf-repo.cpp
@@ -1906,6 +1906,7 @@ out:
     g_free(updatedata.last_mirror_url);
     dnf_state_release_locks(state);
     lr_handle_setopt(priv->repo_handle, NULL, LRO_PROGRESSCB, NULL);
+    lr_handle_setopt(priv->repo_handle, NULL, LRO_HMFCB, NULL);
     lr_handle_setopt(priv->repo_handle, NULL, LRO_PROGRESSDATA, 0xdeadbeef);
     return ret;
 }
-- 
2.13.6

++++++ 0002-reldep-list-Add-glib-AUTOPTR-cleanup.patch ++++++
>From 0d2383159c296d60605db1879531624d2f9cfee1 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Thu, 13 Dec 2018 16:54:23 -0500
Subject: [PATCH 2/8] [reldep-list] Add glib AUTOPTR cleanup

This is still in use by some C clients, notably rpm-ostree.
---
 libdnf/dnf-reldep-list.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libdnf/dnf-reldep-list.h b/libdnf/dnf-reldep-list.h
index afb02303..82e7de30 100644
--- a/libdnf/dnf-reldep-list.h
+++ b/libdnf/dnf-reldep-list.h
@@ -33,6 +33,8 @@ gint dnf_reldep_list_count(DnfReldepList *reldep_list);
 void dnf_reldep_list_add(DnfReldepList *reldep_list, DnfReldep *reldep);
 void dnf_reldep_list_extend(DnfReldepList *rl1, DnfReldepList *rl2);
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(DnfReldepList, dnf_reldep_list_free)
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.13.6

++++++ 0003-swdb-Put-Swdb-constructors-together.patch ++++++
>From 8692fee275d18ae704e32aef377a9ddc9f0f084e Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Tue, 18 Dec 2018 11:02:54 -0500
Subject: [PATCH 3/8] [swdb] Put Swdb constructors together

It confused me when reading this code that the `Swdb` constructors
weren't all together.
---
 libdnf/transaction/Swdb.cpp | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/libdnf/transaction/Swdb.cpp b/libdnf/transaction/Swdb.cpp
index 70d2de5e..3f686591 100644
--- a/libdnf/transaction/Swdb.cpp
+++ b/libdnf/transaction/Swdb.cpp
@@ -50,6 +50,26 @@ Swdb::Swdb(SQLite3Ptr conn, bool autoClose)
 {
 }
 
+Swdb::Swdb(const std::string &path)
+  : conn(nullptr)
+  , autoClose(true)
+{
+    // check if DB file is present
+    if (!pathExists(path.c_str())) {
+        // file not present
+
+        // extract persistdir from path - "/var/lib/dnf/"
+        auto found = path.find_last_of("/");
+
+        Transformer transformer(path.substr(0, found), path);
+        transformer.transform();
+
+        conn = std::make_shared< SQLite3 >(path);
+    } else {
+        conn = std::make_shared< SQLite3 >(path);
+    }
+}
+
 void
 Swdb::resetDatabase()
 {
@@ -496,26 +516,6 @@ Swdb::createCompsGroupItem()
     return std::make_shared< CompsGroupItem >(conn);
 }
 
-Swdb::Swdb(const std::string &path)
-  : conn(nullptr)
-  , autoClose(true)
-{
-    // check if DB file is present
-    if (!pathExists(path.c_str())) {
-        // file not present
-
-        // extract persistdir from path - "/var/lib/dnf/"
-        auto found = path.find_last_of("/");
-
-        Transformer transformer(path.substr(0, found), path);
-        transformer.transform();
-
-        conn = std::make_shared< SQLite3 >(path);
-    } else {
-        conn = std::make_shared< SQLite3 >(path);
-    }
-}
-
 /**
  * Filter unneeded packages from pool
  *
-- 
2.13.6

++++++ 0004-utils-Drop-empty-else-block.patch ++++++
>From e5e652b6b207ac9ec48f8a5ca0882a6bde1c3806 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Tue, 18 Dec 2018 11:16:53 -0500
Subject: [PATCH 4/8] [utils] Drop empty else block

---
 libdnf/utils/sqlite3/Sqlite3.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libdnf/utils/sqlite3/Sqlite3.cpp b/libdnf/utils/sqlite3/Sqlite3.cpp
index 27fed56d..61a0ed62 100644
--- a/libdnf/utils/sqlite3/Sqlite3.cpp
+++ b/libdnf/utils/sqlite3/Sqlite3.cpp
@@ -57,7 +57,6 @@ SQLite3::close()
             sqlite3_finalize(res);
         }
         result = sqlite3_close(db);
-    } else {
     }
     if (result != SQLITE_OK) {
         throw LibException(result, "Close failed");
-- 
2.13.6

++++++ 0005-transformer-Fix-minor-docstring-typo.patch ++++++
>From 119929cdd787b021af75ededd90d104b17ec0301 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Tue, 18 Dec 2018 15:37:07 -0500
Subject: [PATCH 5/8] [transformer] Fix minor docstring typo

---
 libdnf/transaction/Transformer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdnf/transaction/Transformer.cpp 
b/libdnf/transaction/Transformer.cpp
index d46404ee..026d79fa 100644
--- a/libdnf/transaction/Transformer.cpp
+++ b/libdnf/transaction/Transformer.cpp
@@ -82,7 +82,7 @@ static const std::map< std::string, TransactionItemReason > 
reasons = {
     {"group", TransactionItemReason::GROUP}};
 
 /**
- * Covert string reason into appropriate enumerated variant
+ * Convert string reason into appropriate enumerated variant
  */
 TransactionItemReason
 Transformer::getReason(const std::string &reason)
-- 
2.13.6

++++++ 0006-repo-Squash-Wmaybe-uninitialized-warning.patch ++++++
>From 7fdeb273acf0127dad798a05b5f2060e19f5f929 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Thu, 20 Dec 2018 14:05:22 -0500
Subject: [PATCH 6/8] [repo] Squash -Wmaybe-uninitialized warning

This is actually a false positive since we only set it and use it if
`setGPGHomeEnv` is set. But of course, GCC doesn't know that. But still,
let's silence it so that we don't learn to ignore compiler warnings.
---
 libdnf/repo/Repo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdnf/repo/Repo.cpp b/libdnf/repo/Repo.cpp
index 2e82497d..dc0896c9 100644
--- a/libdnf/repo/Repo.cpp
+++ b/libdnf/repo/Repo.cpp
@@ -956,7 +956,7 @@ void Repo::Impl::importRepoKeys()
 std::unique_ptr<LrResult> Repo::Impl::lrHandlePerform(LrHandle * handle, const 
std::string & destDirectory,
     bool setGPGHomeEnv)
 {
-    bool isOrigGPGHomeEnvSet;
+    bool isOrigGPGHomeEnvSet = false;
     std::string origGPGHomeEnv;
     if (setGPGHomeEnv) {
             const char * orig = getenv(GPG_HOME_ENV);
-- 
2.13.6

++++++ 0007-transaction-Consistently-use-the-same-swdb-variable.patch ++++++
>From 15545729c13fc0853f7060157c661e9d4aa238d4 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Thu, 20 Dec 2018 14:38:31 -0500
Subject: [PATCH 7/8] [transaction] Consistently use the same swdb variable

We already declared an `swdb` variable higher up defined to
`priv->swdb`. This function had a mix of `swdb` and `priv->swdb`. Only
use the former for consistency.
---
 libdnf/dnf-transaction.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libdnf/dnf-transaction.cpp b/libdnf/dnf-transaction.cpp
index 2b1df5ca..7615b1e8 100644
--- a/libdnf/dnf-transaction.cpp
+++ b/libdnf/dnf-transaction.cpp
@@ -1209,7 +1209,7 @@ dnf_transaction_commit(DnfTransaction *transaction, 
HyGoal goal, DnfState *state
         }
 
         // add item to swdb transaction
-        _history_write_item(pkg, priv->swdb, swdbAction);
+        _history_write_item(pkg, swdb, swdbAction);
 
         /* this section done */
         ret = dnf_state_done(state_local, error);
@@ -1249,7 +1249,7 @@ dnf_transaction_commit(DnfTransaction *transaction, 
HyGoal goal, DnfState *state
                 swdbAction = libdnf::TransactionItemAction::DOWNGRADED;
             }
         }
-        _history_write_item(pkg, priv->swdb, swdbAction);
+        _history_write_item(pkg, swdb, swdbAction);
     }
 
     /* add anything that gets obsoleted to a helper array which is used to
@@ -1301,7 +1301,7 @@ dnf_transaction_commit(DnfTransaction *transaction, 
HyGoal goal, DnfState *state
             }
 
             // TODO SWDB add pkg_tmp replaced_by pkg
-            _history_write_item(pkg_tmp, priv->swdb, swdbAction);
+            _history_write_item(pkg_tmp, swdb, swdbAction);
         }
         g_ptr_array_unref(pkglist);
     }
-- 
2.13.6

++++++ 0008-transaction-Minor-syntax-tweak.patch ++++++
>From 2b32f55e3f8888f41d778c8f6be754d506f9f2c0 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <[email protected]>
Date: Thu, 20 Dec 2018 14:40:37 -0500
Subject: [PATCH 8/8] [transaction] Minor syntax tweak

Putting the else on a newline here is weird. Let's just be consistent.
---
 libdnf/dnf-transaction.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libdnf/dnf-transaction.cpp b/libdnf/dnf-transaction.cpp
index 7615b1e8..ff5830be 100644
--- a/libdnf/dnf-transaction.cpp
+++ b/libdnf/dnf-transaction.cpp
@@ -1408,8 +1408,7 @@ dnf_transaction_commit(DnfTransaction *transaction, 
HyGoal goal, DnfState *state
     // FIXME get commandline
     if (sack) {
         rpmdb_begin = dnf_sack_get_rpmdb_version(sack);
-    }
-    else {
+    } else {
         // if sack is not available, create a custom instance
         rpmdb_version_sack = dnf_sack_new();
         dnf_sack_load_system_repo(rpmdb_version_sack, nullptr, 
DNF_SACK_LOAD_FLAG_BUILD_CACHE, nullptr);
-- 
2.13.6

++++++ 0101-Zchunk-configuration-flags-were-backwards-so-setting.patch ++++++
>From a7dac48e445859c14e0be3752642dbfc7ec7bd57 Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <[email protected]>
Date: Sat, 22 Dec 2018 16:56:59 +0000
Subject: [PATCH 101/102] Zchunk configuration flags were backwards, so setting
 zchunk=false would enable it.  This fixes that bug.

Signed-off-by: Jonathan Dieter <[email protected]>
---
 libdnf/repo/Repo.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libdnf/repo/Repo.cpp b/libdnf/repo/Repo.cpp
index 2e82497d..67927bc1 100644
--- a/libdnf/repo/Repo.cpp
+++ b/libdnf/repo/Repo.cpp
@@ -580,7 +580,7 @@ std::unique_ptr<LrHandle> Repo::Impl::lrHandleInitLocal()
     handleSetOpt(h.get(), LRO_LOCAL, 1L);
 #ifdef LRO_SUPPORTS_CACHEDIR
     /* If zchunk is enabled, set librepo cache dir */
-    if (!conf->getMasterConfig().zchunk().getValue())
+    if (conf->getMasterConfig().zchunk().getValue())
         handleSetOpt(h.get(), LRO_CACHEDIR, 
conf->basecachedir().getValue().c_str());
 #endif
     return h;
@@ -666,7 +666,7 @@ std::unique_ptr<LrHandle> 
Repo::Impl::lrHandleInitRemote(const char *destdir, bo
 
 #ifdef LRO_SUPPORTS_CACHEDIR
     /* If zchunk is enabled, set librepo cache dir */
-    if (!conf->getMasterConfig().zchunk().getValue())
+    if (conf->getMasterConfig().zchunk().getValue())
         handleSetOpt(h.get(), LRO_CACHEDIR, 
conf->basecachedir().getValue().c_str());
 #endif
 
-- 
2.13.6

++++++ 0102-hy_repos-weren-t-being-filled-properly-when-using-zc.patch ++++++
>From 6f037ab36b03e30cc391b2c3dcab07bc3d9ca2e0 Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <[email protected]>
Date: Sat, 22 Dec 2018 17:01:13 +0000
Subject: [PATCH 102/102] hy_repos weren't being filled properly when using
 zchunk metadata, so this patch fixes that in both the old and new paths

Signed-off-by: Jonathan Dieter <[email protected]>
---
 libdnf/dnf-repo.cpp  | 35 +++++++++++++++++++++++++++--------
 libdnf/repo/Repo.cpp | 17 ++++++++++++++++-
 2 files changed, 43 insertions(+), 9 deletions(-)

diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp
index 1cf762b1..3357af23 100644
--- a/libdnf/dnf-repo.cpp
+++ b/libdnf/dnf-repo.cpp
@@ -1439,14 +1439,33 @@ dnf_repo_check_internal(DnfRepo *repo,
         hy_repo_free(priv->repo);
     priv->repo = hy_repo_create(priv->id);
     hy_repo_set_string(priv->repo, HY_REPO_MD_FN, yum_repo->repomd);
-    tmp = static_cast<const gchar *>(g_hash_table_lookup(priv->filenames_md, 
"primary"));
-    hy_repo_set_string(priv->repo, HY_REPO_PRIMARY_FN, tmp);
-    tmp = static_cast<const gchar *>(g_hash_table_lookup(priv->filenames_md, 
"filelists"));
-    hy_repo_set_string(priv->repo, HY_REPO_FILELISTS_FN, tmp);
-    tmp = static_cast<const gchar *>(g_hash_table_lookup(priv->filenames_md, 
"updateinfo"));
-    hy_repo_set_string(priv->repo, HY_REPO_UPDATEINFO_FN, tmp);
-    tmp = static_cast<const gchar *>(g_hash_table_lookup(priv->filenames_md, 
"modules"));
-    hy_repo_set_string(priv->repo, MODULES_FN, tmp);
+    if (dnf_context_get_zchunk(priv->context)) {
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "primary_zck"));
+        if(!tmp)
+            tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "primary"));
+        hy_repo_set_string(priv->repo, HY_REPO_PRIMARY_FN, tmp);
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "filelists_zck"));
+        if(!tmp)
+            tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "filelists"));
+        hy_repo_set_string(priv->repo, HY_REPO_FILELISTS_FN, tmp);
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "updateinfo_zck"));
+        if(!tmp)
+            tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "updateinfo"));
+        hy_repo_set_string(priv->repo, HY_REPO_UPDATEINFO_FN, tmp);
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "modules_zck"));
+        if(!tmp)
+            tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "modules"));
+        hy_repo_set_string(priv->repo, MODULES_FN, tmp);
+    } else {
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "primary"));
+        hy_repo_set_string(priv->repo, HY_REPO_PRIMARY_FN, tmp);
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "filelists"));
+        hy_repo_set_string(priv->repo, HY_REPO_FILELISTS_FN, tmp);
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "updateinfo"));
+        hy_repo_set_string(priv->repo, HY_REPO_UPDATEINFO_FN, tmp);
+        tmp = static_cast<const gchar 
*>(g_hash_table_lookup(priv->filenames_md, "modules"));
+        hy_repo_set_string(priv->repo, MODULES_FN, tmp);
+    }
 
     /* ensure we reset the values from the keyfile */
     if (!dnf_repo_set_keyfile_data(repo, error))
diff --git a/libdnf/repo/Repo.cpp b/libdnf/repo/Repo.cpp
index 67927bc1..1ab00a9a 100644
--- a/libdnf/repo/Repo.cpp
+++ b/libdnf/repo/Repo.cpp
@@ -280,10 +280,25 @@ private:
             delete[] *item;
         delete[] ptr;
     }};
+    bool endsWith(std::string const &str, std::string const &ending) const;
 };
 
+bool Repo::Impl::endsWith(const std::string &str, const std::string &ending) 
const {
+    if (str.length() >= ending.length())
+        return (str.compare(str.length() - ending.length(), ending.length(), 
ending) == 0);
+    else
+        return false;
+}
+
 std::string Repo::Impl::getMetadataPath(const std::string &metadataType) const 
{
-    auto it = metadataPaths.find(metadataType);
+    std::string lookupMetadataType = metadataType;
+    if (conf->getMasterConfig().zchunk().getValue()) {
+        if(!endsWith(metadataType, "_zck"))
+            lookupMetadataType = metadataType + "_zck";
+    }
+    auto it = metadataPaths.find(lookupMetadataType);
+    if(it == metadataPaths.end() && lookupMetadataType != metadataType)
+        it = metadataPaths.find(metadataType);
     return (it != metadataPaths.end()) ? it->second : "";
 }
 
-- 
2.13.6

++++++ libdnf-0.24.1-Switch-default-reposdir-to-etc-dnf-repos.d.patch ++++++
>From 9b5952d9c45f9b9575c2f00e94aba4d45b141e89 Mon Sep 17 00:00:00 2001
From: Neal Gompa <[email protected]>
Date: Thu, 7 Feb 2019 01:14:33 -0500
Subject: [PATCH] Switch default reposdir to /etc/dnf/repos.d

---
 libdnf/conf/ConfigMain.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdnf/conf/ConfigMain.cpp b/libdnf/conf/ConfigMain.cpp
index 6964f3e5..84878cc7 100644
--- a/libdnf/conf/ConfigMain.cpp
+++ b/libdnf/conf/ConfigMain.cpp
@@ -208,7 +208,7 @@ class ConfigMain::Impl {
     OptionString logdir{"/var/log"};
     OptionBinding logDirBinding{owner, logdir, "logdir"};
 
-    OptionStringList reposdir{{"/etc/yum.repos.d", "/etc/yum/repos.d", 
"/etc/distro.repos.d"}};
+    OptionStringList reposdir{{"/etc/dnf/repos.d", "/etc/yum.repos.d", 
"/etc/yum/repos.d", "/etc/distro.repos.d"}};
     OptionBinding reposDirBinding{owner, reposdir, "reposdir"};
 
     OptionBool debug_solver{false};
-- 
2.20.1

++++++ libdnf-0.9.3-with-static-libsolvext.patch -> 
libdnf-0.24.1-with-static-libsolvext.patch ++++++
--- /work/SRC/openSUSE:Factory/libdnf/libdnf-0.9.3-with-static-libsolvext.patch 
2018-08-20 16:21:36.537008007 +0200
+++ 
/work/SRC/openSUSE:Factory/.libdnf.new.28833/libdnf-0.24.1-with-static-libsolvext.patch
     2019-02-20 14:10:47.750950166 +0100
@@ -1,6 +1,6 @@
-From c9e1aa46714c2b173c4139caf7cc296c62a8edf2 Mon Sep 17 00:00:00 2001
+From a24c0c00d7c78c386492cfafeb3968a9f9e6ebfa Mon Sep 17 00:00:00 2001
 From: Neal Gompa <[email protected]>
-Date: Sun, 13 Aug 2017 12:35:11 -0400
+Date: Tue, 5 Feb 2019 08:45:33 -0500
 Subject: [PATCH] Ensure libsolvext dynamic library dependencies are linked
 
 libsolv, when built only build with static link libraries, does not
@@ -19,11 +19,11 @@
  create mode 100644 cmake/modules/FindLZMA.cmake
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3b98e08..1194211 100644
+index 4f92a1c..d2aa64c 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -39,6 +39,19 @@ pkg_check_modules (CHECK REQUIRED check)
- pkg_check_modules (REPO REQUIRED librepo)
+@@ -67,6 +67,19 @@ FIND_PACKAGE (OpenSSL REQUIRED)
+ 
  FIND_PROGRAM (VALGRIND_PROGRAM NAMES valgrind PATH /usr/bin /usr/local/bin)
  
 +# Ensure that static libsolvext dynamic library dependencies are linked in
@@ -39,9 +39,9 @@
 +FIND_LIBRARY (ZSTD_LIBRARY NAMES zstd)
 +# End static libsolvext dynamic library dependencies
 +
- # TODO handle yumdb / dnfdb for libdnf
- ADD_DEFINITIONS(-DBUILDOPT_USE_DNF_YUMDB=1)
- 
+ IF (ENABLE_SOLV_URPMREORDER)
+    ADD_DEFINITIONS(-DLIBSOLV_FLAG_URPMREORDER=1)
+ ENDIF()
 diff --git a/cmake/modules/FindLZMA.cmake b/cmake/modules/FindLZMA.cmake
 new file mode 100644
 index 0000000..eb112df
@@ -74,15 +74,15 @@
 +  SET( LZMA_LIBRARIES )
 +ENDIF(LZMA_FOUND)
 diff --git a/libdnf/CMakeLists.txt b/libdnf/CMakeLists.txt
-index 6e25c57..8a288cd 100644
+index 7bf1cfd..d51eea7 100644
 --- a/libdnf/CMakeLists.txt
 +++ b/libdnf/CMakeLists.txt
-@@ -44,7 +44,13 @@ TARGET_LINK_LIBRARIES(libdnf
-                       ${GLIB_GIO_UNIX_LIBRARIES}
-                       ${LIBSOLV_LIBRARY}
-                       ${LIBSOLV_EXT_LIBRARY}
--                      ${RPMDB_LIBRARY})
-+                      ${RPMDB_LIBRARY}
+@@ -71,7 +71,13 @@ TARGET_LINK_LIBRARIES(libdnf
+                       ${JSONC_LIBRARIES}
+                       ${LIBMODULEMD_LIBRARIES}
+                       ${SMARTCOLS_LIBRARIES}
+-                      ${GPGME_VANILLA_LIBRARIES})
++                      ${GPGME_VANILLA_LIBRARIES}
 +                      ${LIBXML2_LIBRARIES}
 +                      ${ZLIB_LIBRARY}
 +                      ${LZMA_LIBRARY}
@@ -93,5 +93,5 @@
  if (ENABLE_RHSM_SUPPORT)
      target_link_libraries (libdnf ${RHSM_LIBRARIES})
 -- 
-2.17.1
+2.20.1
 

++++++ libdnf-0.11.1.tar.gz -> libdnf-0.24.1.tar.gz ++++++
++++ 154021 lines of diff (skipped)


Reply via email to