[pacman-dev] updpkgsums read/write collision

Dave Reisner d at falconindy.com
Sun Dec 14 18:01:00 UTC 2014

On Sun, Dec 14, 2014 at 06:40:38PM +0100, David Macek wrote:
> On 14. 12. 2014 17:53, Dave Reisner wrote:
> > I don't really understand this. You're saying that the PKGBUILD itself
> > isn't subst'd, but the underlying device that it resides on? That sounds
> > an awful lot like a deficiency in the underlying implementation (or some
> > problem with cygwin's handling of such drives).
> It's possible. I'll present this issue to cygwin devs.

I'd be curious to know if it behaves the same way as root (assuming such
a concept exists). It should be sufficient the present the minimal case

  $ echo 'hello world' >foo
  $ { rm foo; awk '1' >foo; } <foo

Technically, I don't believe the file needs content, but as a matter of
verification, I include it. The file will appear unmodified afterwards
if this is working as intended.

> > Not having used Windows as a day-to-day OS in last 5-6 years, I have no
> > idea how to do this, nor can I easily test it. Patches welcome for such
> > an approach.
> The only solution I found so far was to use WINAPI QueryDosDevice, which I don't think is appropriate for pacman as a cross-platform application that doesn't directly deal with drives and filesystems.
> > So, the implemenation is the way it is right now because I didn't want
> > to play games with temporary files (and the naming problems that come
> > along with it). I already conceded to making a tempdir for the purposes
> > of keeping the build directory clean, so I suppose I can be persuaded to
> > use a tempfile for the newly rewritten PKGBUILD.
> > 
> > Does this patch fix your problem?
> > 
> > https://paste.xinu.at/oKQMN/
> Yes, it does. It would help if it was merged into upstream pacman.

Surely. This is an acceptable change for Linux as well. Thanks for the


More information about the pacman-dev mailing list