[pacman-dev] updpkgsums read/write collision

David Macek david.macek.0 at gmail.com
Sun Dec 14 16:13:11 UTC 2014


Hi all.

I have noticed a problem with updpkgsums on Windows when it's run on a subst'd drive (created with `subst` or using an entry in `DOS Devices` registry key). The error message I see is following:

/usr/bin/updpkgsums: line 85: PKGBUILD: Permission denied

The PKGBUILD is then gone. 

I don't fully understand what's going on on lines 78-97 with the input/output redirection and deleting, but I assume this can be fixed by
1) either enhancing the routine for dereferencing symlinks (lines 54-62) to recognize subst'd drives,
2) or by modifying the script to first rename the original $buildfile, and delete it after finishing the new $buildfile.

For the time being, I worked around the problem by modifying the script to first read $buildfile into a variable, then delete it and then pass the variable contents to awk to write to $buildfile.

My question is following: can the script be changed in order to avoid this issue?

Ref: https://github.com/Alexpux/MSYS2-packages/issues/143

-- 
David Macek


More information about the pacman-dev mailing list