diffoscope: 329 -> 331 (#567175)

This commit is contained in:
Michael Daniels
2026-09-26 17:43:51 +00:00
committed by GitHub
2 changed files with 2 additions and 29 deletions

View File

@@ -112,12 +112,12 @@ in
# Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
python.pkgs.buildPythonApplication rec {
pname = "diffoscope";
version = "329";
version = "331";
pyproject = true;
src = fetchurl {
url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
hash = "sha256-UPe+Mko9r4qoSTPbDurF64aZgmPLizV8iK2UlCfyfxk=";
hash = "sha256-x1Sc1S3PER3m1+maUZjDofoGqiOoYIm2Oso7Q5NKNtw=";
};
outputs = [
@@ -128,7 +128,6 @@ python.pkgs.buildPythonApplication rec {
patches = [
./androguard-4.1.4.patch
./ignore_links.patch
./radare2.patch
];
postPatch = ''

View File

@@ -1,26 +0,0 @@
Fix comparing ELF objects when r2 is in PATH
https://github.com/radareorg/radare2/issues/21201 renamed the "offset" key of
the json output diffoscope uses to "addr". As a result running diffoscope on an
ELF object results in this error:
KeyError: 'offset'
This patch does not include the modifications to the test suite required to
submit it upstream.
Upstream issue: https://salsa.debian.org/reproducible-builds/diffoscope/-/work_items/432
diff --git a/diffoscope/comparators/decompile.py b/diffoscope/comparators/decompile.py
index bf85deb9..f6a5564f 100644
--- a/diffoscope/comparators/decompile.py
+++ b/diffoscope/comparators/decompile.py
@@ -242,6 +242,9 @@ class AsmFunction(File):
@property
def offset(self):
+ if "addr" in self.data_dict:
+ return self.data_dict["addr"]
+ # backward compat with r2 version < 5.9.0
return self.data_dict["offset"]
@property