Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [RFA] bad VER in src-release causes snapshot failure
Date: Thu, 11 Jul 2013 15:34:00 -0000	[thread overview]
Message-ID: <20130711153403.GH8063@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

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

[-- Attachment #2: 0001-src-release-Fix-VER-computation-for-TOOL-gdb.patch --]
[-- Type: text/x-diff, Size: 1526 bytes --]

From b32d1dbce8e331bfaac6e5175d3c269c11436a3b Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
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


             reply	other threads:[~2013-07-11 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 15:34 Joel Brobecker [this message]
2013-07-11 16:17 ` Tom Tromey
2013-07-11 16:42   ` Joel Brobecker
2013-07-11 16:45     ` Joel Brobecker
2013-07-13 15:03       ` Tom Tromey
2013-07-22 15:18         ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130711153403.GH8063@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox