public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] econf: update config.{sub,guess} atomically to avoid races
@ 2013-12-17 23:23 Mike Frysinger
  2013-12-17 23:28 ` [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} " Mike Frysinger
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2013-12-17 23:23 UTC (permalink / raw
  To: gentoo-portage-dev

URL: https://bugs.gentoo.org/487478
---
 bin/phase-helpers.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index ec48c94..59c053a 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -512,7 +512,9 @@ econf() {
 			-name config.guess -o -name config.sub ')' -print0 | \
 			while read -r -d $'\0' x ; do
 				__vecho " * econf: updating ${x/${WORKDIR}\/} with ${EPREFIX}/usr/share/gnuconfig/${x##*/}"
-				cp -f "${EPREFIX}"/usr/share/gnuconfig/"${x##*/}" "${x}"
+				# Make sure we do this atomically incase we're run in parallel. #487478
+				cp -f "${EPREFIX}"/usr/share/gnuconfig/"${x##*/}" "${x}.$$"
+				mv -f "${x}.$$" "${x}"
 			done
 		fi
 
-- 
1.8.4.3



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-21  9:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 23:23 [gentoo-portage-dev] [PATCH] econf: update config.{sub,guess} atomically to avoid races Mike Frysinger
2013-12-17 23:28 ` [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} " Mike Frysinger
2013-12-18  0:26   ` Brian Dolbec
2013-12-18  1:08     ` Alec Warner
2013-12-18  1:41   ` Greg Turner
2013-12-18  1:58     ` Alec Warner
2013-12-18  2:53       ` Greg Turner
2013-12-18  5:16         ` Alec Warner
2013-12-21  3:07   ` [gentoo-portage-dev] " Ryan Hill
2013-12-21  9:23     ` Mike Frysinger
2013-12-21  9:49     ` [gentoo-portage-dev] [PATCH] add a __bashpid helper for <bash-4.0 versions Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox