Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] bad VER in src-release causes snapshot failure
@ 2013-07-11 15:34 Joel Brobecker
  2013-07-11 16:17 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2013-07-11 15:34 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

[-- 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-22 15:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-11 15:34 [RFA] bad VER in src-release causes snapshot failure Joel Brobecker
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox