[Git][reproducible-builds/diffoscope][master] Disable binwalk's own user configuration for predictable results and to ensure…

Chris Lamb gitlab at salsa.debian.org
Mon Sep 10 19:05:51 CEST 2018


Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
075acf2f by Chris Lamb at 2018-09-10T17:05:40Z
Disable binwalk's own user configuration for predictable results and to ensure it does not create (!) unnecessary directories, etc. (Closes: #903444)

- - - - -


1 changed file:

- diffoscope/comparators/binwalk.py


Changes:

=====================================
diffoscope/comparators/binwalk.py
=====================================
@@ -36,6 +36,14 @@ try:
     import binwalk
 except ImportError:
     binwalk = None
+else:
+    # Disable binwalk's own user configuration for predictable results and to
+    # ensure it does not create (!) unnecessary directories, etc. (re. #903444)
+    def fn(self):
+        if not hasattr(fn, '_temp_dir'):
+            fn._temp_dir = get_temporary_directory('binwalk').name
+        return fn._temp_dir
+    binwalk.core.settings.Settings._get_user_config_dir = fn
 
 logger = logging.getLogger(__name__)
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/075acf2f8c599e0f53463fee368a1a929e94a8eb

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/075acf2f8c599e0f53463fee368a1a929e94a8eb
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/20180910/4f7d6c19/attachment.html>


More information about the rb-commits mailing list