filed with extra info in https://bugzilla.opensuse.org/show_bug.cgi?id=1083835
_build_docs is called 6 times - once for each file in bin
because of that, the code is racy when using make -j
which is the default in openSUSE package build
please review/test/merge the attached patch
I also made this alternative less intrusive patch that leaves the flawed logic as is, but avoids the racy file corruption by using a tmpfile with an atomic rename
4.13.2 released with an appropriate fix in it. I didn't use your patch but fixed the underlying cause of the error (which was due to my failure in understanding how _build_docs was being called)
Thanks for the report