diff --git a/0001-tempfiles-empty-the-list-of-known-tempfiles-after-re.patch b/0001-tempfiles-empty-the-list-of-known-tempfiles-after-re.patch new file mode 100644 index 0000000..cd7086f --- /dev/null +++ b/0001-tempfiles-empty-the-list-of-known-tempfiles-after-re.patch @@ -0,0 +1,40 @@ +From a6b4effcfb24780d9d2d1b76efa33132381f76eb Mon Sep 17 00:00:00 2001 +From: Mattia Rizzolo +Date: Sun, 1 Jul 2018 20:53:48 +0200 +Subject: [PATCH] tempfiles: empty the list of known tempfiles after removing + them + +tempfiles would be cleaned up between tests, so the new "base directory" +would be removed as well, that made the next tentative to create a temporary +directory fail. + +This is not interesting for regular execution of diffoscope, as only +programs executing diffoscope.main.main() twice within the same python +process would notice. + +Closes: #902709 +Signed-off-by: Mattia Rizzolo +--- + diffoscope/tempfiles.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/diffoscope/tempfiles.py b/diffoscope/tempfiles.py +index 4e4e93f3d9..83357d6d86 100644 +--- a/diffoscope/tempfiles.py ++++ b/diffoscope/tempfiles.py +@@ -55,6 +55,7 @@ def clean_all_temp_files(): + pass + except: + logger.exception("Unable to delete %s", x) ++ _FILES.clear() + + logger.debug("Cleaning %d temporary directories", len(_DIRS)) + +@@ -75,6 +76,7 @@ def clean_all_temp_files(): + pass + except: + logger.exception("Unable to delete %s", x) ++ _DIRS.clear() + + + def _get_base_temporary_directory(): diff --git a/diffoscope.spec b/diffoscope.spec index 14b7e74..70425ce 100644 --- a/diffoscope.spec +++ b/diffoscope.spec @@ -1,5 +1,5 @@ Name: diffoscope -Version: 96 +Version: 98 Release: 1%{?dist} Summary: In-depth comparison of files, archives, and directories License: GPLv3+ @@ -7,6 +7,8 @@ URL: https://diffoscope.org/ #Source0: https://files.pythonhosted.org/packages/source/d/diffoscope/diffoscope-%%{version}.tar.gz Source0: https://salsa.debian.org/reproducible-builds/diffoscope/-/archive/%{version}/diffoscope-%{version}.tar.gz +Patch0: 0001-tempfiles-empty-the-list-of-known-tempfiles-after-re.patch + %global tools \ acl \ e2fsprogs \ @@ -82,7 +84,7 @@ diffoscope is developed as part of the "reproducible builds" Debian project and was formerly known as "debbindiff". %prep -%autosetup +%autosetup -p1 sed -i '1{\@/usr/bin/env@d}' diffoscope/main.py %build @@ -130,6 +132,9 @@ py.test-%{python3_version} tests/ -vv %doc %{_mandir}/man1/diffoscope.1* %changelog +* Mon Jul 2 2018 Zbigniew Jędrzejewski-Szmek - 98-1 +- Update to latest upstream version (declared python3.7 compat) + * Mon Jun 25 2018 Zbigniew Jędrzejewski-Szmek - 96-1 - Update to latest version diff --git a/sources b/sources index 7a8be06..b1ca23f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (diffoscope-96.tar.gz) = db0e54525f6fa2a699180d18e802e9fd029bec80106a994845d56d1dae70539ae1c68188a4b9caa8cfcd9b1f4c7b94986e8d54233cc4dc82c235d7a77bb2433f +SHA512 (diffoscope-98.tar.gz) = 70a389ac7884fffe0f1f679952a8b8f5b3c876d582b9a9cd43b216e0afe0a162b7ccd2fec2e07054d7f6210abf2ff40534e0fce9b57c298c33cc115c02e01b8c