AlmaLinux changes
This commit is contained in:
commit
e8923650e9
@ -0,0 +1,70 @@
|
||||
From 025d477f63baf3df2f6da3b10a21f00d4a339073 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Tue, 8 Feb 2022 09:30:03 +0100
|
||||
Subject: [PATCH] Skip rich deps for autodetection of unmet dependencies (RhBug:2033130, 2048394)
|
||||
|
||||
Rich dependencies are difficult to properly evaluate because we do not
|
||||
have enough information about past and only libsolv is capable to
|
||||
evaluate it in comparison to present state of the system.
|
||||
|
||||
Additionally - rich deps are used for langpacks therefore disabling
|
||||
unmet rich deps will have a negative impact on UX.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2048394
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2033130
|
||||
---
|
||||
libdnf/goal/Goal.cpp | 22 +++++++++++++++++++---
|
||||
1 file changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libdnf/goal/Goal.cpp b/libdnf/goal/Goal.cpp
|
||||
index 2b698f7..ebe2fbd 100644
|
||||
--- a/libdnf/goal/Goal.cpp
|
||||
+++ b/libdnf/goal/Goal.cpp
|
||||
@@ -835,8 +835,12 @@ Goal::exclude_from_weak_autodetect()
|
||||
installed_names.push_back(dnf_package_get_name(pkg));
|
||||
std::unique_ptr<libdnf::DependencyContainer> recommends(dnf_package_get_recommends(pkg));
|
||||
for (int i = 0; i < recommends->count(); ++i) {
|
||||
- Query query(base_query);
|
||||
std::unique_ptr<libdnf::Dependency> dep(recommends->getPtr(i));
|
||||
+ const char * dep_string = dep->toString();
|
||||
+ if (dep_string[0] == '(') {
|
||||
+ continue;
|
||||
+ }
|
||||
+ Query query(base_query);
|
||||
const char * version = dep->getVersion();
|
||||
// There can be installed provider in different version or upgraded packed can recommend a different version
|
||||
// Ignore version and search only by reldep name
|
||||
@@ -858,7 +862,7 @@ Goal::exclude_from_weak_autodetect()
|
||||
}
|
||||
}
|
||||
|
||||
- // Invesigate supplements of only available packages with a different name to installed packages
|
||||
+ // Investigate supplements of only available packages with a different name to installed packages
|
||||
installed_names.push_back(nullptr);
|
||||
base_query.addFilter(HY_PKG_NAME, HY_NEQ, installed_names.data());
|
||||
auto * available_pset = base_query.getResultPset();
|
||||
@@ -870,8 +874,20 @@ Goal::exclude_from_weak_autodetect()
|
||||
if (supplements->count() == 0) {
|
||||
continue;
|
||||
}
|
||||
+ libdnf::DependencyContainer supplements_without_rich(getSack());
|
||||
+ for (int i = 0; i < supplements->count(); ++i) {
|
||||
+ std::unique_ptr<libdnf::Dependency> dep(supplements->getPtr(i));
|
||||
+ const char * dep_string = dep->toString();
|
||||
+ if (dep_string[0] == '(') {
|
||||
+ continue;
|
||||
+ }
|
||||
+ supplements_without_rich.add(dep.get());
|
||||
+ }
|
||||
+ if (supplements_without_rich.count() == 0) {
|
||||
+ continue;
|
||||
+ }
|
||||
Query query(installed_query);
|
||||
- query.addFilter(HY_PKG_PROVIDES, supplements.get());
|
||||
+ query.addFilter(HY_PKG_PROVIDES, &supplements_without_rich);
|
||||
// When supplemented package already installed, exclude_from_weak available package
|
||||
if (!query.empty()) {
|
||||
add_exclude_from_weak(pkg);
|
||||
--
|
||||
libgit2 1.1.0
|
||||
|
4689
SOURCES/0003-Update-translations-RhBug-2017349.patch
Normal file
4689
SOURCES/0003-Update-translations-RhBug-2017349.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -56,12 +56,14 @@
|
||||
|
||||
Name: libdnf
|
||||
Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version}
|
||||
Release: 3%{?dist}.alma
|
||||
Release: 5%{?dist}.alma
|
||||
Summary: Library providing simplified C and Python API to libsolv
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/rpm-software-management/libdnf
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch1: 0001-Use-rpmdbCookie-from-librpm-remove-hawkey.Sack._rpmd.patch
|
||||
Patch2: 0002-Skip-rich-deps-for-autodetection-of-unmet-dependencies-RhBug2033130-2048394.patch
|
||||
Patch3: 0003-Update-translations-RhBug-2017349.patch
|
||||
|
||||
# Almalinux patches
|
||||
Patch10001: almalinux_bugtracker.patch
|
||||
@ -308,9 +310,15 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Apr 08 2022 Eduard Abdullin <eabdullin@almalinux.org> - 0.65.0-3.alma
|
||||
* Mon Apr 11 2022 Eduard Abdullin <eabdullin@almalinux.org> - 0.65.0-5.alma
|
||||
- Added patch for almalinux bugtracker
|
||||
|
||||
* Mon Mar 21 2022 Marek Blaha <mblaha@redhat.com> - 0.65.0-5
|
||||
- Update translations
|
||||
|
||||
* Fri Mar 11 2022 Pavla Kratochvilova <pkratoch@redhat.com> - 0.65.0-4
|
||||
- Skip rich deps for autodetection of unmet dependencies (RhBug:2048394)
|
||||
|
||||
* Mon Feb 07 2022 Pavla Kratochvilova <pkratoch@redhat.com> - 0.65.0-3
|
||||
- Use `rpmdbCookie` from librpm, remove `hawkey.Sack._rpmdb_version`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user