From patchwork Fri Jul 12 23:12:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 33688 Received: (qmail 23486 invoked by alias); 12 Jul 2019 23:13:03 -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 23470 invoked by uid 89); 12 Jul 2019 23:13:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Jul 2019 23:13:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 44FFB5616A; Fri, 12 Jul 2019 19:13:00 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MYXqwcYUVf2m; Fri, 12 Jul 2019 19:13:00 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0F35E56091; Fri, 12 Jul 2019 19:13:00 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 300A6858F1; Fri, 12 Jul 2019 16:12:58 -0700 (PDT) From: Joel Brobecker To: gcc-patches@gcc.gnu.org Cc: gdb-patches@sourceware.org, Sergio Durigan Junior , Tom Tromey Subject: [RFA] adjust src-release following the renaming of gdb/common/ to gdb/gdbsupport/ Date: Fri, 12 Jul 2019 16:12:56 -0700 Message-Id: <20190712231256.21418-1-brobecker@adacore.com> 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! 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