Merge pull request #15053 from groxxda/bump/diffoscope

diffoscope: 49 -> 52
This commit is contained in:
Eelco Dolstra 2016-04-28 19:33:01 +02:00
commit 9586def07e
2 changed files with 29 additions and 7 deletions

@ -6,22 +6,19 @@
pythonPackages.buildPythonApplication rec { pythonPackages.buildPythonApplication rec {
name = "diffoscope-${version}"; name = "diffoscope-${version}";
version = "49"; version = "52";
namePrefix = ""; namePrefix = "";
src = fetchgit { src = fetchgit {
url = "git://anonscm.debian.org/reproducible/diffoscope.git"; url = "git://anonscm.debian.org/reproducible/diffoscope.git";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
sha256 = "0kh96h95rp7bk8rgc1z18jwv89dyp1n36bawqyqxhwwklmrgxr66"; sha256 = "1a22abvjs8f8c4anrcfhn02xw7m2gl701b9csxy06c5ymib0npxd";
}; };
patches = patches =
[ # Ignore different link counts and inode change times. [ # Ignore different link counts.
(fetchpatch { ./ignore_links.patch
url = https://github.com/edolstra/diffoscope/commit/367f77bba8df0dbc89e63c9f66f05736adf5ec59.patch;
sha256 = "0mnp7icdrjn02dr6f5dwqvvr848jzgkv3cg69a24234y9gxd30ww";
})
]; ];
postPatch = '' postPatch = ''

@ -0,0 +1,25 @@
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Nix deduplicates by hard-linking identical files, so it's normal for
the the number of links to a file to differ.
---
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 7d1cd75..bd91eb0 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -47,6 +47,7 @@ class Stat(Command):
FILE_RE = re.compile(r'^\s*File:.*$')
DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d')
INODE_RE = re.compile(r'Inode: [0-9]+')
+ LINKS_RE = re.compile(r'Links: [0-9]+')
ACCESS_TIME_RE = re.compile(r'^Access: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
CHANGE_TIME_RE = re.compile(r'^Change: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
@@ -55,6 +56,7 @@ class Stat(Command):
line = Stat.FILE_RE.sub('', line)
line = Stat.DEVICE_RE.sub('', line)
line = Stat.INODE_RE.sub('', line)
+ line = Stat.LINKS_RE.sub('', line)
line = Stat.ACCESS_TIME_RE.sub('', line)
line = Stat.CHANGE_TIME_RE.sub('', line)
return line.encode('utf-8')