From pwroot@jhome.DIALix.COM  Fri Jul 14 03:04:38 1995
Received: from jhome.DIALix.COM (jhome.DIALix.COM [192.203.228.69])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id DAA01337
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jul 1995 03:04:33 -0700
Received: (from root@localhost) by jhome.DIALix.COM (8.6.11/8.6.9) id SAA07402; Fri, 14 Jul 1995 18:04:26 +0800
Message-Id: <199507141004.SAA07402@jhome.DIALix.COM>
Date: Fri, 14 Jul 1995 18:04:26 +0800
From: peter@haywire.dialix.com
Reply-To: peter@haywire.dialix.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: send-pr reports wrong release
X-Send-Pr-Version: 3.2

>Number:         613
>Category:       bin
>Synopsis:       send-pr reports wrong release
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 14 03:10:02 1995
>Closed-Date:    Sun Sep 17 09:05:19 PDT 1995
>Last-Modified:  Sun Sep 17 09:44:37 PDT 1995
>Originator:     Peter Wemm
>Release:        FreeBSD 2.0-BUILT-19950517 i386
>Organization:
DIALix
>Environment:

uname -rsm:
FreeBSD 2.2-CURRENT i386

supped earlier today, followed by a "make all install"

>Description:

As you can see a few lines up, send-pr is _still_ claiming that the
"Release" is several months old, even though everything is as recent as
it can get, and compiled and installed.

The problem is, that the Makefile generates obj/send-pr from send-pr.sh
*once* and never, ever updates it, because there are no dependencies to
cause it to be regenerated.

>How-To-Repeat:

use send-pr.. :-)

>Fix:
	
The makefile uses a sed command to substitute @DEFAULT_RELEASE@ with the
output of "uname -rsm" at build initial build time.  IMHO, this has to be 
done at run-time, otherwise the ">Release:" header is pretty much
meaningless.

If a more meaningful Release header is to be generated in the future,
perhaps for routing the PR, then it will have to do other things to
generate it's release string at run-time, or "obj/send-pr.sh" is going
to need to be rebuilt every single time there is a make in the directory..
(requiring a make clean beforehand is not an option..)

*** send-pr.sh.broken	Fri Jul 14 17:49:58 1995
--- send-pr.sh	Wed Jul 12 03:54:57 1995
***************
*** 40,46 ****
  [ ! -d $DATADIR/gnats -a -d "$GCC_EXEC_PREFIX" ] && DATADIR=@DATADIR@
  
  # The default release for this host.
! DEFAULT_RELEASE="@DEFAULT_RELEASE@"
  
  # The default organization.
  DEFAULT_ORGANIZATION=
--- 40,49 ----
  [ ! -d $DATADIR/gnats -a -d "$GCC_EXEC_PREFIX" ] && DATADIR=@DATADIR@
  
  # The default release for this host.
! #DEFAULT_RELEASE="@DEFAULT_RELEASE@"
! DEFAULT_RELEASE=`( [ -f /bin/uname ] && /bin/uname -rsm ) || \
!                  ( [ -f /usr/bin/uname ] && /usr/bin/uname -rsm ) || \
!                  echo "@DEFAULT_RELEASE@"`
  
  # The default organization.
  DEFAULT_ORGANIZATION=

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: gpalmer 
State-Changed-When: Sun Sep 17 09:05:19 PDT 1995 
State-Changed-Why:  
Duplicate of bin/506 
>Unformatted:


