[diffoscope] 01/01: Clean up temporary debuglink files

Reiner Herrmann reiner at reiner-h.de
Thu May 5 13:59:07 CEST 2016


This is an automated email from the git hooks/post-receive script.

deki-guest pushed a commit to branch master
in repository diffoscope.

commit b6258d99f8db5902905622ed2370c28a22b9740f
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu May 5 13:48:01 2016 +0200

    Clean up temporary debuglink files
---
 diffoscope/comparators/elf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/elf.py b/diffoscope/comparators/elf.py
index eb1dd00..e9c8e01 100644
--- a/diffoscope/comparators/elf.py
+++ b/diffoscope/comparators/elf.py
@@ -22,7 +22,7 @@ import os.path
 import re
 import subprocess
 from diffoscope import tool_required, OutputParsingError
-from diffoscope import logger
+from diffoscope import logger, get_named_temporary_file
 from diffoscope.comparators.binary import File
 from diffoscope.comparators.libarchive import list_libarchive
 from diffoscope.comparators.deb import DebFile, get_build_id_map
@@ -398,7 +398,7 @@ class ElfContainer(Container):
         # But for now, we need to do more complicated thingsā€¦
         # 1. Use objcopy to create a file with only the original .gnu_debuglink section
 	#    as we will have to update it to get the CRC right.
-        debuglink_path = '{}.debuglink'.format(self.source.path)
+        debuglink_path = get_named_temporary_file(prefix='{}.debuglink.'.format(self.source.path)).name
         subprocess.check_call(['objcopy', '--only-section=.gnu_debuglink', self.source.path, debuglink_path], shell=False, stderr=subprocess.DEVNULL)
 	# 2. Monkey-patch the ElfSection object created for the .gnu_debuglink to
         #    change the path to point to this new file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list