I use Arch and the package manager bailed out on several packages during the install. I traced this to a failed install-info call to add entries for package to the 'dir' that info use.
After strace'ng the code, I observe it will do a open with O_TRUNC flag, and then write out some data. If the process is killed between the open and write, it will leave 0 byte dir file which can't written to by subsequent install-info calls. You should consider replacing this with a 'write to temp/rename temp to dir' changeover that's atomic.
While this is rare occurrence, I've seen numerous failures like this reported on Redhat and Arch forums.
Strace results:
open("dir", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcf1c842000
write(3, "This is the file .../info/dir, w"..., 867) = 867
|