void-packages/srcpkgs/dstat/patches/dstat.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

20 lines
859 B
Diff

--- a/dstat.orig 2020-11-21 17:50:21.000000000 -0800
+++ b/dstat 2021-02-04 22:50:28.970723977 -0800
@@ -19,7 +19,7 @@
from __future__ import absolute_import, division, generators, print_function
__metaclass__ = type
-import collections
+import collections.abc
import fnmatch
import getopt
import getpass
@@ -512,7 +512,7 @@
scale = self.scales[i]
else:
scale = self.scale
- if isinstance(self.val[name], collections.Sequence) and not isinstance(self.val[name], six.string_types):
+ if isinstance(self.val[name], collections.abc.Sequence) and not isinstance(self.val[name], six.string_types):
line = line + cprintlist(self.val[name], ctype, self.width, scale)
sep = theme['frame'] + char['colon']
if i + 1 != len(self.vars):