mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
diffoscope: Revive hard links patch
This commit is contained in:
parent
4b28da6fd8
commit
890d4a2853
|
@ -16,8 +16,7 @@ python3Packages.buildPythonApplication rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Ignore different link counts - doesn't work with 85
|
./ignore_links.patch
|
||||||
# ./ignore_links.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -1,19 +1,32 @@
|
||||||
diff -ru -x '*~' diffoscope-orig/diffoscope/comparators/directory.py diffoscope/diffoscope/comparators/directory.py
|
From a33e8018092e4a91dbc45e15bbeff760b3418512 Mon Sep 17 00:00:00 2001
|
||||||
--- diffoscope-orig/diffoscope/comparators/directory.py 1970-01-01 01:00:01.000000000 +0100
|
From: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
|
||||||
+++ diffoscope/diffoscope/comparators/directory.py 2016-12-08 17:37:55.000315157 +0100
|
Date: Wed, 13 Sep 2017 16:53:38 +0300
|
||||||
@@ -49,6 +49,7 @@
|
Subject: [PATCH] Ignore hard link counts
|
||||||
FILE_RE = re.compile(r'^\s*File:.*$')
|
|
||||||
DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d\s+')
|
---
|
||||||
INODE_RE = re.compile(r'Inode: [0-9]+\s+')
|
diffoscope/comparators/directory.py | 2 ++
|
||||||
+ LINKS_RE = re.compile(r'Links: [0-9]+\s+')
|
1 file changed, 2 insertions(+)
|
||||||
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}.*$')
|
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
|
||||||
|
index 3b195bc..9071bb3 100644
|
||||||
|
--- a/diffoscope/comparators/directory.py
|
||||||
|
+++ b/diffoscope/comparators/directory.py
|
||||||
|
@@ -66,6 +66,7 @@ else:
|
||||||
|
FILE_RE = re.compile(r'^\s*File:.*$')
|
||||||
|
DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d\s+')
|
||||||
|
INODE_RE = re.compile(r'Inode: [0-9]+\s+')
|
||||||
|
+ LINKS_RE = re.compile(r'Links: [0-9]+\s+')
|
||||||
|
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}.*$')
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@
|
@@ -74,6 +75,7 @@ else:
|
||||||
line = Stat.FILE_RE.sub('', line)
|
line = Stat.FILE_RE.sub('', line)
|
||||||
line = Stat.DEVICE_RE.sub('', line)
|
line = Stat.DEVICE_RE.sub('', line)
|
||||||
line = Stat.INODE_RE.sub('', line)
|
line = Stat.INODE_RE.sub('', line)
|
||||||
+ line = Stat.LINKS_RE.sub('', line)
|
+ line = Stat.LINKS_RE.sub('', line)
|
||||||
line = Stat.ACCESS_TIME_RE.sub('', line)
|
line = Stat.ACCESS_TIME_RE.sub('', line)
|
||||||
line = Stat.CHANGE_TIME_RE.sub('', line)
|
line = Stat.CHANGE_TIME_RE.sub('', line)
|
||||||
return line.encode('utf-8')
|
return line.encode('utf-8')
|
||||||
|
--
|
||||||
|
2.13.0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue