From 79c4077f659771f29bdc9a31d36350b323aedce3 Mon Sep 17 00:00:00 2001 From: Jonathan Dieter Date: Thu, 23 May 2019 19:13:31 +0100 Subject: [PATCH] Add upstream patch to make sure to check next transfer Signed-off-by: Jonathan Dieter --- ...ck-next-transfer-if-current-zck-tran.patch | 36 +++++++++++++++++++ librepo.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-Make-sure-to-check-next-transfer-if-current-zck-tran.patch diff --git a/0001-Make-sure-to-check-next-transfer-if-current-zck-tran.patch b/0001-Make-sure-to-check-next-transfer-if-current-zck-tran.patch new file mode 100644 index 0000000..dfa5f2a --- /dev/null +++ b/0001-Make-sure-to-check-next-transfer-if-current-zck-tran.patch @@ -0,0 +1,36 @@ +From 42ab00919b7415ce92ab33388398e97609805021 Mon Sep 17 00:00:00 2001 +From: Jonathan Dieter +Date: Thu, 16 May 2019 20:43:37 +0100 +Subject: [PATCH] Make sure to check next transfer if current zck transfer + already exists + +Signed-off-by: Jonathan Dieter +--- + librepo/downloader.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/librepo/downloader.c b/librepo/downloader.c +index ad778d3..6189681 100644 +--- a/librepo/downloader.c ++++ b/librepo/downloader.c +@@ -1450,7 +1450,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) + goto fail; + } + +- // If zchunk is finished, we're done ++ // If zchunk is finished, we're done, so move to next target + if(target->zck_state == LR_ZCK_DL_FINISHED) { + g_debug("%s: Target already fully downloaded: %s", __func__, target->target->path); + target->state = LR_DS_FINISHED; +@@ -1461,7 +1461,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) + fclose(target->f); + target->f = NULL; + lr_downloadtarget_set_error(target->target, LRE_OK, NULL); +- return TRUE; ++ return prepare_next_transfer(dd, candidatefound, err); + } + } + # endif /* WITH_ZCHUNK */ +-- +2.21.0 + diff --git a/librepo.spec b/librepo.spec index 8ddfb27..6efd977 100644 --- a/librepo.spec +++ b/librepo.spec @@ -27,12 +27,13 @@ Name: librepo Version: 1.10.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Repodata downloading library License: LGPLv2+ URL: https://github.com/rpm-software-management/librepo Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-Make-sure-to-check-next-transfer-if-current-zck-tran.patch BuildRequires: cmake BuildRequires: gcc @@ -189,6 +190,10 @@ popd %endif %changelog +* Thu May 23 2019 Jonathan Dieter - 1.10.2-2 +- Add upstream patch to make sure to check next transfer if current zck + transfer already exists + * Mon May 20 2019 Pavla Kratochvilova - 1.10.2-1 - Update to 1.10.2 - Add an option to preserve timestamps of the downloaded files (RhBug:1688537)