[Reproducible-commits] [debbindiff] 03/06: Factorize readelf commands
Jérémy Bobbio
lunar at moszumanska.debian.org
Wed Jun 24 12:45:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository debbindiff.
commit 59126faeaa1e66048d5c92083b1efa56b88bba64
Author: Jérémy Bobbio <lunar at debian.org>
Date: Wed Jun 24 12:35:22 2015 +0000
Factorize readelf commands
---
debbindiff/comparators/elf.py | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/debbindiff/comparators/elf.py b/debbindiff/comparators/elf.py
index 14e284b..64cfebe 100644
--- a/debbindiff/comparators/elf.py
+++ b/debbindiff/comparators/elf.py
@@ -25,25 +25,25 @@ from debbindiff.comparators.utils import binary_fallback, get_ar_content, Comman
from debbindiff.difference import Difference
-class ReadelfAll(Command):
+class Readelf(Command):
@tool_required('readelf')
def cmdline(self):
- return ['readelf', '--all', self.path]
-
- def filter(self, line):
- # the full path can appear in the output, we need to remove it
- return line.replace(self.path, os.path.basename(self.path))
+ return ['readelf'] + self.readelf_options() + [self.path]
-
-class ReadelfDebugDump(Command):
- @tool_required('readelf')
- def cmdline(self):
- return ['readelf', '--debug-dump', self.path]
+ def readelf_options(self):
+ return []
def filter(self, line):
# the full path can appear in the output, we need to remove it
return line.replace(self.path, os.path.basename(self.path))
+class ReadelfAll(Readelf):
+ def readelf_options(self):
+ return ['-all']
+
+class ReadelfDebugDump(Readelf):
+ def readelf_options(self):
+ return ['--debug-dump']
class ObjdumpDisassemble(Command):
@tool_required('objdump')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debbindiff.git
More information about the Reproducible-commits
mailing list