diff mbox

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

Message ID 87h80erq4y.fsf@redhat.com
State New
Headers show

Commit Message

Sergio Durigan Junior Jan. 29, 2020, 7:58 p.m. UTC
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.

Comments

Pedro Alves Jan. 29, 2020, 8:04 p.m. UTC | #1
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.)

Thanks,
Pedro Alves
Sergio Durigan Junior Jan. 29, 2020, 8:07 p.m. UTC | #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,
Tom Tromey Jan. 31, 2020, 10:10 a.m. UTC | #3
Sergio> Done.
Sergio> Pushed: fc1ca146f76eea0b76b1392ea1a7aa8fb0742490

Thank you for doing this.

Tom
diff mbox

Patch

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