This is the mail archive of the 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]

Re: GCC 3.[34] snapshots not running

On Thu, 3 Jun 2004, Kelley Cook wrote:

> Snapshots are failing for both GCC 3.3.x and GCC 3.4.x.

The problem is simple enough - diff generation not working for the
empty gfortran component (not present on those branches, but a single
version of the script is used for all snapshot generation) when both
tarballs are actually empty.  I didn't do anything when the error
output started appearing on the gccadmin list since the best fix
wasn't clear (and Gerald's done most of the branch snapshot work).
I've now applied the following patch (tested by running a 3.3 branch
snapshot) to fix the problem.  The empty component tarballs should no
longer be created, but snapshot-README and snapshot-index.html will
still refer to them (ideally, the substitutions in those files should
remove the details of components not present for that version).

2004-06-03  Joseph S. Myers  <>

	* gcc_release (maybe_build_tarfile): New function.
	(build_tarfiles): Use maybe_build_tarfile.

--- gcc_release.orig	2004-05-21 22:19:57.000000000 +0000
+++ gcc_release	2004-06-03 23:15:44.000000000 +0000
@@ -256,7 +256,7 @@
 # Buid a single tarfile.  The first argument is the name of the name
 # of the tarfile to build, without any suffixes.  They will be added
 # automatically.  The rest of the arguments are the files or
-# directories to include.
+# directories to include, and possibly other arguments to tar.
 build_tarfile() {
   # Get the name of the destination tar file.
@@ -269,6 +269,25 @@
+# Build a single tarfile if any of the directories listed exist,
+# but not if none of them do (because that component doesn't exist
+# on this branch).
+maybe_build_tarfile() {
+  dest=$1
+  shift
+  dir_exists=0
+  for maybe_dir in "$@"; do
+    if [ -d "$maybe_dir" ]; then
+      dir_exists=1
+    fi
+  done
+  if [ $dir_exists = 1 ]; then
+    build_tarfile "$dest" "$@"
+  else
+    echo "Not building $dest tarfile"
+  fi
 # Build the various tar files for the release.
 build_tarfiles() {
@@ -286,13 +305,13 @@
   build_tarfile gcc-${RELEASE} `basename ${SOURCE_DIRECTORY}`
   # Now, build one for each of the languages.
-  build_tarfile gcc-ada-${RELEASE} ${ADA_DIRS}
-  build_tarfile gcc-g++-${RELEASE} ${CPLUSPLUS_DIRS}
-  build_tarfile gcc-g77-${RELEASE} ${FORTRAN_DIRS}
-  build_tarfile gcc-fortran-${RELEASE} ${FORTRAN95_DIRS}
-  build_tarfile gcc-java-${RELEASE} ${JAVA_DIRS}
-  build_tarfile gcc-objc-${RELEASE} ${OBJECTIVEC_DIRS}
-  build_tarfile gcc-testsuite-${RELEASE} ${TESTSUITE_DIRS}
+  maybe_build_tarfile gcc-ada-${RELEASE} ${ADA_DIRS}
+  maybe_build_tarfile gcc-g++-${RELEASE} ${CPLUSPLUS_DIRS}
+  maybe_build_tarfile gcc-g77-${RELEASE} ${FORTRAN_DIRS}
+  maybe_build_tarfile gcc-fortran-${RELEASE} ${FORTRAN95_DIRS}
+  maybe_build_tarfile gcc-java-${RELEASE} ${JAVA_DIRS}
+  maybe_build_tarfile gcc-objc-${RELEASE} ${OBJECTIVEC_DIRS}
+  maybe_build_tarfile gcc-testsuite-${RELEASE} ${TESTSUITE_DIRS}
   # The core is everything else.

Joseph S. Myers

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