Adjust src-release.sh's getver due to gdbsupport's move to toplevel

Message ID 20200128222514.10753-1-sergiodj@redhat.com
State New
Headers show
Series
  • Adjust src-release.sh's getver due to gdbsupport's move to toplevel
Related show

Commit Message

Sergio Durigan Junior Jan. 28, 2020, 10:25 p.m.
The move of gdbsupport to the top level directory requires a small
change to src-release.sh's "getver" function, which is responsible for
determining the version string that will be appended to the release
tarball: now the create-version.sh script lives under ./gdbsupport,
and not under gdb/gdbsupport anymore.

This patch unbreaks the snapshot generation, which hasn't been working
since January 14th.

OK?

ChangeLog:
2020-01-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* src-release.sh (getver): Look for gdbsupport's
	create-version.sh script at the current directory.

Change-Id: Id3b8bed6583a1aaa120c07009366f6c94a62d5db
---
 src-release.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.21.0

Comments

Sergio Durigan Junior Jan. 29, 2020, 7:58 p.m. | #1
On Wednesday, January 29 2020, Pedro Alves wrote:

> On 1/28/20 10:25 PM, Sergio Durigan Junior wrote:

>

>> diff --git a/src-release.sh b/src-release.sh

>> index 92e92ac5d7..b3ca5ae137 100755

>> --- a/src-release.sh

>> +++ b/src-release.sh

>> @@ -61,8 +61,8 @@ 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

>> +    elif test -f ./gdbsupport/create-version.sh; then

>> +	./gdbsupport/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp

>

> It seems like this makes it so that the version.in fallback becomes unreachable.

> ./gdbsupport/create-version.sh is always going to exist irrespective of what

> $tool is.  Maybe it would be better to check that $tool is "gdb" instead.


Ah, good catch.  Thanks.

Updated patch below.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

From 7217f1f2da2801054f272c1e88f3a45fa64d7bd5 Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <sergiodj@redhat.com>

Date: Tue, 28 Jan 2020 17:21:41 -0500
Subject: [PATCH] Adjust src-release.sh's getver due to gdbsupport's move to
 toplevel

The move of gdbsupport to the top level directory requires a small
change to src-release.sh's "getver" function, which is responsible for
determining the version string that will be appended to the release
tarball: now the create-version.sh script lives under ./gdbsupport,
and not under gdb/gdbsupport anymore.

This patch unbreaks the snapshot generation, which hasn't been working
since January 14th.

OK?

ChangeLog:
2020-01-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* src-release.sh (getver): Look for gdbsupport's
	create-version.sh script at the current directory if tool is
	"gdb".

Change-Id: Id3b8bed6583a1aaa120c07009366f6c94a62d5db
---
 src-release.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src-release.sh b/src-release.sh
index 92e92ac5d7..1de971eb01 100755
--- a/src-release.sh
+++ b/src-release.sh
@@ -61,8 +61,8 @@ 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
+    elif test $tool = "gdb"; then
+	./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
-- 
2.21.0
Sergio Durigan Junior Jan. 29, 2020, 8:07 p.m. | #2
On Wednesday, January 29 2020, Pedro Alves wrote:

> On 1/29/20 7:58 PM, Sergio Durigan Junior wrote:

>> On Wednesday, January 29 2020, Pedro Alves wrote:

>> 

>>> On 1/28/20 10:25 PM, Sergio Durigan Junior wrote:

>>>

>>>> diff --git a/src-release.sh b/src-release.sh

>>>> index 92e92ac5d7..b3ca5ae137 100755

>>>> --- a/src-release.sh

>>>> +++ b/src-release.sh

>>>> @@ -61,8 +61,8 @@ 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

>>>> +    elif test -f ./gdbsupport/create-version.sh; then

>>>> +	./gdbsupport/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp

>>>

>>> It seems like this makes it so that the version.in fallback becomes unreachable.

>>> ./gdbsupport/create-version.sh is always going to exist irrespective of what

>>> $tool is.  Maybe it would be better to check that $tool is "gdb" instead.

>> 

>> Ah, good catch.  Thanks.

>> 

>> Updated patch below.

>

> OK.

>

> (Be sure to strip the "OK?" from the pushed commit.)


Done.

Pushed: fc1ca146f76eea0b76b1392ea1a7aa8fb0742490

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

Patch

diff --git a/src-release.sh b/src-release.sh
index 92e92ac5d7..b3ca5ae137 100755
--- a/src-release.sh
+++ b/src-release.sh
@@ -61,8 +61,8 @@  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
+    elif test -f ./gdbsupport/create-version.sh; then
+	./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