mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
diffoscope: 329 -> 331 (#567175)
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user