Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: gdb-patches@sourceware.org,
	Sergio Durigan Junior <sergiodj@redhat.com>,
	Tom Tromey <tromey@adacore.com>
Subject: [RFA] adjust src-release following the renaming of gdb/common/ to gdb/gdbsupport/
Date: Fri, 12 Jul 2019 23:13:00 -0000	[thread overview]
Message-ID: <20190712231256.21418-1-brobecker@adacore.com> (raw)

Hello,

A recent change renamed the common/ directory into gdbsupport/ in gdb.
This causes problems in the getver function in the src-release script
which doesn't find the create-version.sh script anymore. As a result,
it falls back on using the version.in file verbatim, meaning that
the "DATE" placeholder doesn't get replaced with the snapshot date,
and the "-git" suffix doesn't get stripped. More precisely, we get
snapshots called "gdb-8.3.50-DATE-git.tar" instead of (e.g.)
"gdb-8.3-20190712.tar".

For those who have been getting snapshots from sourceware, this is also
why recent snapshots are missing.

This commit fixes the issue by adding support for this situation.
I left the support for $tool/common/create-version.sh, because
the sim still uses that directory structure.

ChangeLog:

        * src-release (getver): If $tool/gdbsupport/create-version.sh
        exists, use that to determine the version number.

Tested on x86_64-linux, by running the src-release script with "gdb"
as the argument, and verifying that the name of the tarball is now
correct.

OK to push?

Thanks!
-- 
Joel

---
 src-release.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src-release.sh b/src-release.sh
index 1654656146f..90d556896c9 100755
--- a/src-release.sh
+++ b/src-release.sh
@@ -61,6 +61,10 @@ getver()
 	$tool/common/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp
 	cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-git$//'
         rm -f VER.tmp
+    elif test -f $tool/gdbsupport/create-version.sh; then
+	$tool/gdbsupport/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp
+	cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-git$//'
+        rm -f VER.tmp
     elif test -f $tool/version.in; then
 	head -1 $tool/version.in
     else
-- 
2.17.1


             reply	other threads:[~2019-07-12 23:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 23:13 Joel Brobecker [this message]
2019-07-13  5:45 ` Richard Biener
2019-07-14  1:02   ` Joel Brobecker

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=20190712231256.21418-1-brobecker@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.com \
    --cc=tromey@adacore.com \
    /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