This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

PATCH for Re: Help with changing snapshot mechanism


On Sat, 17 Jan 2004, Gerald Pfeifer wrote:
>> That seems reasonable (the diffs support is very general - running the
>> script manually you could build a release with diffs from the previous
>> release, and diffs from the previous prerelease, and diffs from the last
>> snapshot on that branch - but the snapshot mode presently hardcodes the
>> version number for the diffs to be the same as that for the new snapshot:
>>     OLD_TARS=${LAST_DIR}/gcc-${BRANCH}-${LAST_DATE}.tar.bz2
> I believe I can address this by a three-liner.

Like so.  The first part is a bug fix I found while working on the second.

Installed and updated on gcc.gnu.org.

Gerald


2004-03-27  Gerald Pfeifer  <gerald@pfeifer.com>

	* gcc_release: Fix sanitfy check for argument of -p command-line
	option.  In snapshot mode, only generate diffs against the previous
	one if the other did not specify any old tarball explictly.

Index: gcc_release
===================================================================
RCS file: /cvs/gcc/gcc/maintainer-scripts/gcc_release,v
retrieving revision 1.49
diff -u -3 -p -r1.49 gcc_release
--- gcc_release	25 Mar 2004 10:57:50 -0000	1.49
+++ gcc_release	27 Mar 2004 01:18:26 -0000
@@ -540,7 +540,7 @@ while getopts "d:fr:u:t:p:s:l" ARG; do
 	  SCP=cp
 	  PATH=~:/usr/local/bin:$PATH;;
     p)    OLD_TARS="${OLD_TARS} ${OPTARG}"
-          if [ -d ${OPTARG} ]; then
+          if [ ! -f ${OPTARG} ]; then
 	    error "-p argument must name a tarball"
 	  fi;;
     \?)   usage;;
@@ -615,9 +615,10 @@ else
     TAG=gcc-ss-`echo ${RELEASE} | tr '.' '_'`
   fi

-  # Building locally on gcc.gnu.org, we know what the last snapshot date
-  # was.
-  if [ $MODE_DIFFS -ne 0 ] && [ $LOCAL -ne 0 ]; then
+  # If diffs are requested when building locally on gcc.gnu.org, we (usually)
+  # know what the last snapshot date was and take the corresponding tarballs,
+  # unless the user specified tarballs explictly.
+  if [ $MODE_DIFFS -ne 0 ] && [ $LOCAL -ne 0 ] && [ -z "${OLD_TARS}" ]; then
     LAST_DATE=`cat ~/.snapshot_date-${BRANCH}`
     OLD_TARS=${SNAPSHOTS_DIR}/${BRANCH}-${LAST_DATE}/gcc-${BRANCH}-${LAST_DATE}.tar.bz2
   fi


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