[Git][reproducible-builds/diffoscope][master] 4 commits: Ensure we check FALLBACK_FILE_EXTENSION_SUFFIX, otherwise we run pgpdump...
Chris Lamb
gitlab at salsa.debian.org
Fri Sep 11 09:17:31 UTC 2020
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
bab3e0e7 by Chris Lamb at 2020-09-11T09:59:34+01:00
Ensure we check FALLBACK_FILE_EXTENSION_SUFFIX, otherwise we run pgpdump against all files that are recognised by file(1) as "data".
- - - - -
6bb06d29 by Chris Lamb at 2020-09-11T10:00:52+01:00
Abstract out a variable we use a couple of times.
Gbp-Dch: ignore
- - - - -
34606a66 by Chris Lamb at 2020-09-11T10:06:12+01:00
Check that pgpdump is actually installed before attempting to run it. (Closes: Debian#969753)
- - - - -
ab8464dd by Chris Lamb at 2020-09-11T10:08:41+01:00
releasing package diffoscope version 160
- - - - -
4 changed files:
- debian/changelog
- diffoscope/__init__.py
- diffoscope/comparators/pgp.py
- tests/comparators/test_directory.py
Changes:
=====================================
debian/changelog
=====================================
@@ -1,8 +1,12 @@
-diffoscope (160) UNRELEASED; urgency=medium
+diffoscope (160) unstable; urgency=medium
- * WIP (generated upon release).
+ * Check that pgpdump is actually installed before attempting to run it.
+ Thanks to Gianfranco Costamagna (locutusofborg). (Closes: #969753)
+ * Add some documentation for the EXTERNAL_TOOLS dictionary.
+ * Ensure we check FALLBACK_FILE_EXTENSION_SUFFIX, otherwise we run pgpdump
+ against all files that are recognised by file(1) as "data".
- -- Chris Lamb <lamby at debian.org> Fri, 04 Sep 2020 11:25:57 +0100
+ -- Chris Lamb <lamby at debian.org> Fri, 11 Sep 2020 10:08:38 +0100
diffoscope (159) unstable; urgency=medium
=====================================
diffoscope/__init__.py
=====================================
@@ -18,4 +18,4 @@
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
-VERSION = "159"
+VERSION = "160"
=====================================
diffoscope/comparators/pgp.py
=====================================
@@ -22,7 +22,7 @@ import re
import logging
import subprocess
-from diffoscope.tools import tool_required
+from diffoscope.tools import tool_required, tool_check_installed
from diffoscope.tempfiles import get_temporary_directory
from diffoscope.difference import Difference
@@ -91,7 +91,12 @@ class PgpFile(File):
@classmethod
def fallback_recognizes(cls, file):
- if file.magic_file_type == "data":
+ # Ensure we check FALLBACK_FILE_EXTENSION_SUFFIX, otherwise we run
+ # pgpdump against all files that are recognised by file(1) as "data"
+ if not super().fallback_recognizes(file):
+ return False
+
+ if file.magic_file_type == "data" and tool_check_installed("pgpdump"):
try:
output = our_check_output(
("pgpdump", file.path), stderr=subprocess.DEVNULL
=====================================
tests/comparators/test_directory.py
=====================================
@@ -34,16 +34,14 @@ TEST_FILE2_PATH = data("text_ascii2")
def test_no_differences():
- difference = compare_directories(
- os.path.dirname(__file__), os.path.dirname(__file__)
- )
+ x = os.path.dirname(__file__)
+ difference = compare_directories(x, x)
assert difference is None
def test_no_differences_with_extra_slash():
- difference = compare_directories(
- os.path.dirname(__file__) + "/", os.path.dirname(__file__)
- )
+ x = os.path.dirname(__file__)
+ difference = compare_directories(x + "/", x)
assert difference is None
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/c6a438a0d2bb145dc94ebbea4200d1b23649ab09...ab8464ddea3ab30dcd79e87e68a0d6a495c6ab2f
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/c6a438a0d2bb145dc94ebbea4200d1b23649ab09...ab8464ddea3ab30dcd79e87e68a0d6a495c6ab2f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200911/8ae9105d/attachment.htm>
More information about the rb-commits
mailing list