From patchwork Wed Jan 29 19:58:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 37617 Received: (qmail 48165 invoked by alias); 29 Jan 2020 19:58:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 48148 invoked by uid 89); 29 Jan 2020 19:58:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Jan 2020 19:58:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580327928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qx3FT5YU5mH4hKi4bq7gwnyWJRlDORSpsqj9s6yoyr8=; b=dkDkMDJ4ieo1FfeAG85cDDtZU3ib/rIUzWCqvIWj0F7FwFBiu++u6CqGX4e/RjrQSUD+ns 9zH439kpgG7pQi9GSLcdSEqHrcu8JuNe3EZOJIHUOOknZjvg/z3r7u26alEzKVn9jjVnmb SQ59HNpd+BLpbHJJVwM6nYqwZvb2LHg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-21-TsmrRpC1OomZzIZ5IghZFg-1; Wed, 29 Jan 2020 14:58:39 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 079BF1861AC0; Wed, 29 Jan 2020 19:58:38 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id C341660BE0; Wed, 29 Jan 2020 19:58:37 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches , tom@tromey.com, binutils@sourceware.org Subject: Re: [PATCH] Adjust src-release.sh's getver due to gdbsupport's move to toplevel References: <20200128222514.10753-1-sergiodj@redhat.com> <28831a42-3bb1-c232-0d8f-f18c5a4343d5@redhat.com> Date: Wed, 29 Jan 2020 14:58:37 -0500 In-Reply-To: <28831a42-3bb1-c232-0d8f-f18c5a4343d5@redhat.com> (Pedro Alves's message of "Wed, 29 Jan 2020 18:13:22 +0000") Message-ID: <87h80erq4y.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-IsSubscribed: yes 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. 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