public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/rust/master] docker: Fix GCCRS_BUILD info
Date: Thu,  9 Jun 2022 06:17:04 +0000 (GMT)	[thread overview]
Message-ID: <20220609061704.A7F42385C317@sourceware.org> (raw)

https://gcc.gnu.org/g:ab0f9f9e1b9e55522e649d58520fdedcdb6c8859

commit ab0f9f9e1b9e55522e649d58520fdedcdb6c8859
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date:   Wed Jun 8 10:57:16 2022 +0200

    docker: Fix GCCRS_BUILD info
    
    Sometimes, the GCCRS_BUILD file would end up empty. I believe this is
    due to how Dockerfiles work in that there was a "race condition" between
    the two `RUN` commands. Hopefully this should fix it.

Diff:
---
 Dockerfile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index da97edacb9e..759b934fc42 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -50,6 +50,7 @@ RUN apt-get update; \
 ADD . /usr/src/gcc
 RUN /bin/sh -c set -ex; \
     cd /usr/src/gcc; \
+    git log -1 --format="%h" > /GCCRS_BUILD; \
     ./contrib/download_prerequisites; 	{ rm *.tar.* || true; }; \
     mkdir -p /usr/src/gcc/gcc-build; \
     cd /usr/src/gcc/gcc-build; \
@@ -59,9 +60,6 @@ RUN /bin/sh -c set -ex; \
     cd /root; \
     rm -rf /usr/src/gcc
 
-RUN cd /usr/src/gcc; \
-  git log -1 --format="%h" > /GCCRS_BUILD; \
-
 RUN /bin/sh -c set -ex; \
     echo '/usr/local/lib64' > /etc/ld.so.conf.d/local-lib64.conf; \
     ldconfig -v


                 reply	other threads:[~2022-06-09  6:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220609061704.A7F42385C317@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).