From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11902 invoked by alias); 11 Jul 2013 15:34:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11892 invoked by uid 89); 11 Jul 2013 15:34:10 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Jul 2013 15:34:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4ED891C675B; Thu, 11 Jul 2013 11:34:07 -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 yFCal6iCvkTo; Thu, 11 Jul 2013 11:34:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id F38651C66B4; Thu, 11 Jul 2013 11:34:06 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7483EC031F; Thu, 11 Jul 2013 08:34:03 -0700 (PDT) Date: Thu, 11 Jul 2013 15:34:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA] bad VER in src-release causes snapshot failure Message-ID: <20130711153403.GH8063@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Found: No X-SW-Source: 2013-07/txt/msg00321.txt.bz2 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1457 The current snapshots are still failing because src-release is not translating the "DATE" marker in the version number. This results in packages whose name looks like this: gdb-7.6.50.DATE-cvs.tar (which then unpacks to a directory named "gdb-7.6.50.DATE-cvs"). This is because src-release hasn't been adapted to do the translation. Variable "VER" in the makefile is expected to contain the version number, and is computed as follow: | VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ | bfd/configure --version | sed -n -e '1s,.* ,,p'; \ | elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ | sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ | elif test -f $(TOOL)/version.in; then \ | head -1 $(TOOL)/version.in; \ | elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ | sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ | else \ | echo VERSION; \ | fi` Attached is a patch that fixes the problem. It re-uses create-version.sh rather than re-implementing the code for the umpteen time... Tom, what do you think? This leaves the $(TOOL)/version.in branch, but as far as I can tell, it is now dead for all of src. ChangeLog: * src-release (VER): Use $(TOOL)/common/create-version.sh if it exists. Tested on x86_64-linux. -- Joel --Kj7319i9nmIyA2yE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-src-release-Fix-VER-computation-for-TOOL-gdb.patch" Content-length: 1527 >From b32d1dbce8e331bfaac6e5175d3c269c11436a3b Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 11 Jul 2013 08:15:43 -0700 Subject: [PATCH] src-release: Fix VER computation for TOOL=gdb Without this patch, the DATE marker in gdb/version.in does not get replaced by the source packaging date, causing the name of the tarball being created to: have the DATE marker in the tarball name and the name of the directory the sources unpack to (Eg: gdb-7.6.50-DATE-cvs.tar instead of gdb-7.6.50-20130710-cvs.tar). ChangeLog: * src-release (VER): Use $(TOOL)/common/create-version.sh if it exists. --- src-release | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src-release b/src-release index c388cbe..cf6d266 100644 --- a/src-release +++ b/src-release @@ -70,6 +70,12 @@ VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null bfd/configure --version | sed -n -e '1s,.* ,,p'; \ elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + elif test -f $(TOOL)/common/create-version.sh; then \ + $(TOOL)/common/create-version.sh $(TOOL) \ + 'dummy-host' 'dummy-target' \ + VER.tmp; \ + cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/'; \ + rm -f VER.tmp; \ elif test -f $(TOOL)/version.in; then \ head -1 $(TOOL)/version.in; \ elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ -- 1.7.10.4 --Kj7319i9nmIyA2yE--