void-packages/srcpkgs/hplip/patches/sane.patch
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: convert patches to -Np1
```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

31 lines
1.1 KiB
Diff

--- a/scan/sane.py 2020-10-13 22:29:59.456276307 -0400
+++ b/scan/sane.py 2020-10-13 22:32:44.663586789 -0400
@@ -378,14 +378,14 @@
def isScanActive(self):
if self.scan_thread is not None:
- return self.scan_thread.isAlive() and self.scan_thread.scan_active
+ return self.scan_thread.is_alive() and self.scan_thread.scan_active
else:
return False
def waitForScanDone(self):
if self.scan_thread is not None and \
- self.scan_thread.isAlive() and \
+ self.scan_thread.is_alive() and \
self.scan_thread.scan_active:
try:
@@ -398,9 +398,9 @@
#time.sleep(0.5)
if self.scan_thread is not None:
while True:
- #print self.scan_thread.isAlive()
+ #print self.scan_thread.is_alive()
#print self.scan_thread.scan_active
- if self.scan_thread.isAlive() and \
+ if self.scan_thread.is_alive() and \
self.scan_thread.scan_active:
return