import libdnf-0.55.0-6.el8
This commit is contained in:
parent
388ba09ea7
commit
dd620dd71d
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,134 @@
|
||||
From 816d18d826dc7134e553eae28f4aaca9a27e2307 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
|
||||
Date: Mon, 2 Nov 2020 11:43:19 +0100
|
||||
Subject: [PATCH 1/2] Allow loading ext metadata even if only cache (solv) is
|
||||
present
|
||||
|
||||
If we have a valid (checksum matches with repomd) solv file for
|
||||
requested type of metadata allow using it even if we no longer have the
|
||||
original xml metadata.
|
||||
---
|
||||
libdnf/dnf-sack.cpp | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp
|
||||
index 6a43f01e3..608103d18 100644
|
||||
--- a/libdnf/dnf-sack.cpp
|
||||
+++ b/libdnf/dnf-sack.cpp
|
||||
@@ -371,20 +371,9 @@ load_ext(DnfSack *sack, HyRepo hrepo, _hy_repo_repodata which_repodata,
|
||||
auto repoImpl = libdnf::repoGetImpl(hrepo);
|
||||
Repo *repo = repoImpl->libsolvRepo;
|
||||
const char *name = repo->name;
|
||||
- auto fn = hrepo->getMetadataPath(which_filename);
|
||||
FILE *fp;
|
||||
gboolean done = FALSE;
|
||||
|
||||
- /* nothing set */
|
||||
- if (fn.empty()) {
|
||||
- g_set_error (error,
|
||||
- DNF_ERROR,
|
||||
- DNF_ERROR_NO_CAPABILITY,
|
||||
- _("no %1$s string for %2$s"),
|
||||
- which_filename, name);
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
char *fn_cache = dnf_sack_give_cache_fn(sack, name, suffix);
|
||||
fp = fopen(fn_cache, "r");
|
||||
assert(libdnf::repoGetImpl(hrepo)->checksum);
|
||||
@@ -416,6 +405,17 @@ load_ext(DnfSack *sack, HyRepo hrepo, _hy_repo_repodata which_repodata,
|
||||
if (done)
|
||||
return TRUE;
|
||||
|
||||
+ auto fn = hrepo->getMetadataPath(which_filename);
|
||||
+ /* nothing set */
|
||||
+ if (fn.empty()) {
|
||||
+ g_set_error (error,
|
||||
+ DNF_ERROR,
|
||||
+ DNF_ERROR_NO_CAPABILITY,
|
||||
+ _("no %1$s string for %2$s"),
|
||||
+ which_filename, name);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
fp = solv_xfopen(fn.c_str(), "r");
|
||||
if (fp == NULL) {
|
||||
g_set_error (error,
|
||||
|
||||
From aa2a372158f1b264708f960f387218deea17ef2a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
|
||||
Date: Thu, 10 Dec 2020 14:21:03 +0100
|
||||
Subject: [PATCH 2/2] Extend repo loadCache method with ignoreMissing parameter
|
||||
|
||||
This allows loading even incomplete cache of xml files, only repomd.xml
|
||||
is requried.
|
||||
|
||||
= changelog =
|
||||
msg: Extend repo loadCache method with ignoreMissing parameter to allow
|
||||
loading incomplete xml cache (repomd.xml is required).
|
||||
type: enhancement
|
||||
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1865803
|
||||
---
|
||||
VERSION.cmake | 2 +-
|
||||
libdnf.spec | 2 +-
|
||||
libdnf/repo/Repo-private.hpp | 2 +-
|
||||
libdnf/repo/Repo.cpp | 8 ++++++--
|
||||
libdnf/repo/Repo.hpp | 2 +-
|
||||
5 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libdnf/repo/Repo-private.hpp b/libdnf/repo/Repo-private.hpp
|
||||
index 1e4ea4d20..c2ce369dc 100644
|
||||
--- a/libdnf/repo/Repo-private.hpp
|
||||
+++ b/libdnf/repo/Repo-private.hpp
|
||||
@@ -111,7 +111,7 @@ class Repo::Impl {
|
||||
~Impl();
|
||||
|
||||
bool load();
|
||||
- bool loadCache(bool throwExcept);
|
||||
+ bool loadCache(bool throwExcept, bool ignoreMissing=false);
|
||||
void downloadMetadata(const std::string & destdir);
|
||||
bool isInSync();
|
||||
void fetch(const std::string & destdir, std::unique_ptr<LrHandle> && h);
|
||||
diff --git a/libdnf/repo/Repo.cpp b/libdnf/repo/Repo.cpp
|
||||
index 34539e1ee..84702c294 100644
|
||||
--- a/libdnf/repo/Repo.cpp
|
||||
+++ b/libdnf/repo/Repo.cpp
|
||||
@@ -379,7 +379,7 @@ std::string Repo::getLocalBaseurl() const
|
||||
}
|
||||
|
||||
bool Repo::load() { return pImpl->load(); }
|
||||
-bool Repo::loadCache(bool throwExcept) { return pImpl->loadCache(throwExcept); }
|
||||
+bool Repo::loadCache(bool throwExcept, bool ignoreMissing) { return pImpl->loadCache(throwExcept, ignoreMissing); }
|
||||
void Repo::downloadMetadata(const std::string & destdir) { pImpl->downloadMetadata(destdir); }
|
||||
bool Repo::getUseIncludes() const { return pImpl->useIncludes; }
|
||||
void Repo::setUseIncludes(bool enabled) { pImpl->useIncludes = enabled; }
|
||||
@@ -963,11 +963,15 @@ std::unique_ptr<LrResult> Repo::Impl::lrHandlePerform(LrHandle * handle, const s
|
||||
return result;
|
||||
}
|
||||
|
||||
-bool Repo::Impl::loadCache(bool throwExcept)
|
||||
+bool Repo::Impl::loadCache(bool throwExcept, bool ignoreMissing)
|
||||
{
|
||||
std::unique_ptr<LrHandle> h(lrHandleInitLocal());
|
||||
std::unique_ptr<LrResult> r;
|
||||
|
||||
+ if (ignoreMissing) {
|
||||
+ handleSetOpt(h.get(), LRO_IGNOREMISSING, 1L);
|
||||
+ }
|
||||
+
|
||||
// Fetch data
|
||||
try {
|
||||
r = lrHandlePerform(h.get(), getCachedir(), conf->repo_gpgcheck().getValue());
|
||||
diff --git a/libdnf/repo/Repo.hpp b/libdnf/repo/Repo.hpp
|
||||
index eeec651c3..be376f60c 100644
|
||||
--- a/libdnf/repo/Repo.hpp
|
||||
+++ b/libdnf/repo/Repo.hpp
|
||||
@@ -167,7 +167,7 @@ struct Repo {
|
||||
* @return true if fresh metadata were downloaded, false otherwise.
|
||||
*/
|
||||
bool load();
|
||||
- bool loadCache(bool throwExcept);
|
||||
+ bool loadCache(bool throwExcept, bool ignoreMissing=false);
|
||||
void downloadMetadata(const std::string & destdir);
|
||||
bool getUseIncludes() const;
|
||||
void setUseIncludes(bool enabled);
|
53
SOURCES/0006-Add-new-option-module-stream-switch.patch
Normal file
53
SOURCES/0006-Add-new-option-module-stream-switch.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From a1c96ecae6f2052407345a66293710109323de3a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
|
||||
Date: Tue, 21 Jul 2020 15:37:05 +0200
|
||||
Subject: [PATCH] Add new option module_stream_switch
|
||||
|
||||
= changelog =
|
||||
msg: Add new options module_stream_switch
|
||||
type: enhancement
|
||||
---
|
||||
libdnf/conf/ConfigMain.cpp | 3 +++
|
||||
libdnf/conf/ConfigMain.hpp | 1 +
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/libdnf/conf/ConfigMain.cpp b/libdnf/conf/ConfigMain.cpp
|
||||
index 1ffd3b336..abfc2082b 100644
|
||||
--- a/libdnf/conf/ConfigMain.cpp
|
||||
+++ b/libdnf/conf/ConfigMain.cpp
|
||||
@@ -278,6 +278,7 @@ class ConfigMain::Impl {
|
||||
OptionBool downloadonly{false}; // runtime only option
|
||||
OptionBool ignorearch{false};
|
||||
OptionString module_platform_id{nullptr};
|
||||
+ OptionBool module_stream_switch{false};
|
||||
|
||||
OptionString user_agent{getUserAgent()};
|
||||
OptionBool countme{false};
|
||||
@@ -434,6 +435,7 @@ ConfigMain::Impl::Impl(Config & owner)
|
||||
owner.optBinds().add("comment", comment);
|
||||
owner.optBinds().add("ignorearch", ignorearch);
|
||||
owner.optBinds().add("module_platform_id", module_platform_id);
|
||||
+ owner.optBinds().add("module_stream_switch", module_stream_switch);
|
||||
owner.optBinds().add("user_agent", user_agent);
|
||||
owner.optBinds().add("countme", countme);
|
||||
owner.optBinds().add("protect_running_kernel", protect_running_kernel);
|
||||
@@ -569,6 +571,7 @@ OptionBool & ConfigMain::downloadonly() { return pImpl->downloadonly; }
|
||||
OptionBool & ConfigMain::ignorearch() { return pImpl->ignorearch; }
|
||||
|
||||
OptionString & ConfigMain::module_platform_id() { return pImpl->module_platform_id; }
|
||||
+OptionBool & ConfigMain::module_stream_switch() { return pImpl->module_stream_switch; }
|
||||
OptionString & ConfigMain::user_agent() { return pImpl->user_agent; }
|
||||
OptionBool & ConfigMain::countme() { return pImpl->countme; }
|
||||
OptionBool & ConfigMain::protect_running_kernel() {return pImpl->protect_running_kernel; }
|
||||
diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp
|
||||
index 226c74d50..835e1fc65 100644
|
||||
--- a/libdnf/conf/ConfigMain.hpp
|
||||
+++ b/libdnf/conf/ConfigMain.hpp
|
||||
@@ -125,6 +125,7 @@ class ConfigMain : public Config {
|
||||
OptionBool & ignorearch();
|
||||
|
||||
OptionString & module_platform_id();
|
||||
+ OptionBool & module_stream_switch();
|
||||
OptionString & user_agent();
|
||||
OptionBool & countme();
|
||||
OptionBool & protect_running_kernel();
|
@ -0,0 +1,23 @@
|
||||
From 831d023c3c6fb4a28903cb3170efdd9f85645e1a Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Fri, 20 Nov 2020 16:30:17 +0100
|
||||
Subject: [PATCH] Fix removal step during modular enable in context part
|
||||
|
||||
It resolves `free(): double free detected in tcache 2`
|
||||
---
|
||||
libdnf/dnf-context.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp
|
||||
index 069267119..bc4a15b68 100644
|
||||
--- a/libdnf/dnf-context.cpp
|
||||
+++ b/libdnf/dnf-context.cpp
|
||||
@@ -3087,7 +3087,7 @@ static std::vector<std::tuple<libdnf::ModulePackageContainer::ModuleErrorType, s
|
||||
}
|
||||
for (auto iter = stream_dict.begin(); iter != stream_dict.end(); ) {
|
||||
if (iter->first != enabledOrDefaultStream) {
|
||||
- stream_dict.erase(iter);
|
||||
+ stream_dict.erase(iter++);
|
||||
} else {
|
||||
++iter;
|
||||
}
|
@ -56,7 +56,7 @@
|
||||
|
||||
Name: libdnf
|
||||
Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version}
|
||||
Release: 3%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Library providing simplified C and Python API to libsolv
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/rpm-software-management/libdnf
|
||||
@ -64,6 +64,11 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-Better-msgs-if-basecachedir-or-proxy-password-isn-t-set-RhBug-1888946.patch
|
||||
Patch1: 0002-modules-Add-special-handling-for-src-artifacts-RhBug-1809314.patch
|
||||
Patch2: 0003-Avoid-multilib-file-conflict-in-config.h-RhBug-1918818.patch
|
||||
Patch3: 0004-context-improve-retrieving-repository-configuration.patch
|
||||
Patch4: 0005-Allow-loading-incomplete-cache-and-loading-ext-solv-files-without-its-repodata.patch
|
||||
Patch5: 0006-Add-new-option-module-stream-switch.patch
|
||||
Patch6: 0007-Fix-removal-step-during-modular-enable-in-context-part.patch
|
||||
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc
|
||||
@ -311,6 +316,16 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Feb 12 2021 Nicola Sella <nsella@redhat.com> - 0.55.0-6
|
||||
- Fix removal step during modular enable in context part
|
||||
|
||||
* Thu Feb 11 2021 Nicola Sella <nsella@redhat.com> - 0.55.0-5
|
||||
- Add new option module_stream_switch
|
||||
|
||||
* Mon Feb 08 2021 Nicola Sella <nsella@redhat.com> - 0.55.0-4
|
||||
- [context] improve retrieving repository configuration
|
||||
- Allow loading incomplete cache and loading ext solv files without its repodata
|
||||
|
||||
* Fri Jan 29 2021 Nicola Sella <nsella@redhat.com> - 0.55.0-3
|
||||
- Avoid multilib file conflict in config.h (RhBug:1918818)
|
||||
- [modules] Add special handling for src artifacts (RhBug:1809314)
|
||||
|
Loading…
Reference in New Issue
Block a user