49cb564d14
* par 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 ```
55 lines
1.8 KiB
Diff
55 lines
1.8 KiB
Diff
It seems that avoiding to create local aliases for the self._rlock and
|
|
self._wlock methods prevents the strange errors on i686 related to
|
|
semaphore locking and unlocking.
|
|
|
|
One example of failing builds is firefox-esr running gyp in an i686 environment.
|
|
|
|
--- a/Lib/multiprocessing/queues.py 2017-09-16 19:38:35.000000000 +0200
|
|
+++ b/Lib/multiprocessing/queues.py 2017-10-24 19:49:06.291351206 +0200
|
|
@@ -369,13 +369,11 @@
|
|
|
|
def _make_methods(self):
|
|
- recv = self._reader.recv
|
|
- racquire, rrelease = self._rlock.acquire, self._rlock.release
|
|
def get():
|
|
- racquire()
|
|
- try:
|
|
- return recv()
|
|
- finally:
|
|
- rrelease()
|
|
+ self._rlock.acquire()
|
|
+ try:
|
|
+ return self._reader.recv()
|
|
+ finally:
|
|
+ self._rlock.release()
|
|
self.get = get
|
|
|
|
if self._wlock is None:
|
|
@@ -383,11 +382,9 @@
|
|
self.put = self._writer.send
|
|
else:
|
|
- send = self._writer.send
|
|
- wacquire, wrelease = self._wlock.acquire, self._wlock.release
|
|
def put(obj):
|
|
- wacquire()
|
|
- try:
|
|
- return send(obj)
|
|
- finally:
|
|
- wrelease()
|
|
+ self._wlock.acquire()
|
|
+ try:
|
|
+ return self._writer.send(obj)
|
|
+ finally:
|
|
+ self._wlock.release()
|
|
self.put = put
|
|
--- a/Modules/_multiprocessing/semaphore.c 2017-09-16 19:38:35.000000000 +0200
|
|
+++ b/Modules/_multiprocessing/semaphore.c 2017-10-28 10:49:56.944993401 +0200
|
|
@@ -378,7 +378,7 @@
|
|
}
|
|
}
|
|
#else
|
|
- int sval;
|
|
+ int sval = -1;
|
|
|
|
/* This check is not an absolute guarantee that the semaphore
|
|
does not rise above maxvalue. */
|