[gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races

2013-12-17 Thread Mike Frysinger
Use $BASHPID which will be unique even in subshells. URL: https://bugs.gentoo.org/487478 --- bin/phase-helpers.sh | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index ec48c94..1a7ae03 100644 ---

Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races

2013-12-17 Thread Brian Dolbec
On Tue, 2013-12-17 at 18:28 -0500, Mike Frysinger wrote: Use $BASHPID which will be unique even in subshells. URL: https://bugs.gentoo.org/487478 --- bin/phase-helpers.sh | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/phase-helpers.sh

Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races

2013-12-17 Thread Alec Warner
LGTM On Tue, Dec 17, 2013 at 4:26 PM, Brian Dolbec dol...@gentoo.org wrote: On Tue, 2013-12-17 at 18:28 -0500, Mike Frysinger wrote: Use $BASHPID which will be unique even in subshells. URL: https://bugs.gentoo.org/487478 --- bin/phase-helpers.sh | 17 +++-- 1 file

Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races

2013-12-17 Thread Greg Turner
On Tue, Dec 17, 2013 at 3:28 PM, Mike Frysinger vap...@gentoo.org wrote: + sed -i \ + -e 1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL: \ + ${ECONF_SOURCE}/configure \ + || die

Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races

2013-12-17 Thread Alec Warner
On Tue, Dec 17, 2013 at 5:41 PM, Greg Turner g...@malth.us wrote: On Tue, Dec 17, 2013 at 3:28 PM, Mike Frysinger vap...@gentoo.org wrote: + sed -i \ + -e 1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL: \ +

Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races

2013-12-17 Thread Alec Warner
On Tue, Dec 17, 2013 at 6:53 PM, Greg Turner g...@malth.us wrote: On Tue, Dec 17, 2013 at 5:58 PM, Alec Warner anta...@gentoo.org wrote: Sed is already atomic antarus@goats5 /tmp/test $ cat foo Debian Rocks! antarus@goats5 /tmp/test $ strace -e trace=file sed -i -e