Gentoo Archives: gentoo-portage-dev

From: Greg Turner <gmt@×××××.us>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races
Date: Wed, 18 Dec 2013 01:41:52
Message-Id: CA+VB3NTneievD=s-Rm7zpVuW0A4JPH-mcfMZ=YjHsCTaoBmiXg@mail.gmail.com
In Reply to: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races by Mike Frysinger
1 On Tue, Dec 17, 2013 at 3:28 PM, Mike Frysinger <vapier@g.o> wrote:
2 > + sed -i \
3 > + -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
4 > + "${ECONF_SOURCE}/configure" \
5 > + || die "Substition of shebang in '${ECONF_SOURCE}/configure' failed"
6
7 Shouldn't we take the same copy, ${pid}-suffix, move approach, here
8 that we've done with config.{sub,guess}? Otherwise, what's to stop
9 these sed's from trampling each other's work-in-progress (the fact
10 that ebuilds don't crash left and right does suggest that some
11 mechanism actually does prevent this, already -- but it's a mystery to
12 me, and I worry it could be some kind of linux-specific filesystem
13 quirk).
14
15 -gmt

Replies