Propagate return value from prepare_repo_download_targets
Resolves: RHEL-85607
This commit is contained in:
parent
0955e723e0
commit
52faea249f
@ -0,0 +1,31 @@
|
|||||||
|
From 089eac540f395db8303e42bc9716a14851b1132c Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
|
||||||
|
Date: Mon, 9 Jun 2025 09:25:39 +0200
|
||||||
|
Subject: [PATCH] Propagate return value from `prepare_repo_download_targets`
|
||||||
|
|
||||||
|
It also ensures that when return value is false there is some error set.
|
||||||
|
---
|
||||||
|
librepo/yum.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/librepo/yum.c b/librepo/yum.c
|
||||||
|
index 56bca3e..482d4d9 100644
|
||||||
|
--- a/librepo/yum.c
|
||||||
|
+++ b/librepo/yum.c
|
||||||
|
@@ -961,7 +961,12 @@ lr_yum_download_repo(LrHandle *handle,
|
||||||
|
|
||||||
|
assert(!err || *err == NULL);
|
||||||
|
|
||||||
|
- prepare_repo_download_targets(handle, repo, repomd, NULL, &targets, &cbdata_list, err);
|
||||||
|
+ ret = prepare_repo_download_targets(handle, repo, repomd, NULL, &targets, &cbdata_list, err);
|
||||||
|
+ if (!ret) {
|
||||||
|
+ assert(!err || *err != NULL);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+ assert(!err || *err == NULL);
|
||||||
|
|
||||||
|
if (!targets)
|
||||||
|
return TRUE;
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
Name: librepo
|
Name: librepo
|
||||||
Version: 1.14.5
|
Version: 1.14.5
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Repodata downloading library
|
Summary: Repodata downloading library
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -22,6 +22,7 @@ URL: https://github.com/rpm-software-management/librepo
|
|||||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0001: 0001-PGP-Set-a-default-creation-SELinux-labels-on-GnuPG-d.patch
|
Patch0001: 0001-PGP-Set-a-default-creation-SELinux-labels-on-GnuPG-d.patch
|
||||||
|
Patch0002: 0002-Propagate-return-value-from-prepare_repo_download_ta.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -105,6 +106,9 @@ Python 3 bindings for the librepo library.
|
|||||||
%{python3_sitearch}/%{name}/
|
%{python3_sitearch}/%{name}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 24 2025 Ales Matej <amatej@redhat.com> - 1.14.5-3
|
||||||
|
- Propagate return value from prepare_repo_download_targets (RHEL-85607)
|
||||||
|
|
||||||
* Thu Oct 12 2023 Petr Pisar <ppisar@redhat.com> - 1.14.5-2
|
* Thu Oct 12 2023 Petr Pisar <ppisar@redhat.com> - 1.14.5-2
|
||||||
- Set default SELinux labels on GnuPG directories (RHEL-11240)
|
- Set default SELinux labels on GnuPG directories (RHEL-11240)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user