This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] bad VER in src-release causes snapshot failure


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]