r22308 - gnucash/trunk/packaging/win32 - Win32 build: remove UPDATE_SOURCES parameter

Geert Janssens gjanssens at code.gnucash.org
Tue Aug 14 11:14:13 EDT 2012


Author: gjanssens
Date: 2012-08-14 11:14:12 -0400 (Tue, 14 Aug 2012)
New Revision: 22308
Trac: http://svn.gnucash.org/trac/changeset/22308

Modified:
   gnucash/trunk/packaging/win32/build_tags_git.sh
   gnucash/trunk/packaging/win32/daily_build.sh
   gnucash/trunk/packaging/win32/defaults.sh
   gnucash/trunk/packaging/win32/install-impl.sh
   gnucash/trunk/packaging/win32/install.sh
Log:
Win32 build: remove UPDATE_SOURCES parameter

Developers should manually choose when and how to update their checked
out repository. Automated builders can simply write a short wrapper
script around the install the does the update for them. The
daily_build_git.sh and daily_build.sh scripts are fine examples.

Modified: gnucash/trunk/packaging/win32/build_tags_git.sh
===================================================================
--- gnucash/trunk/packaging/win32/build_tags_git.sh	2012-08-12 23:21:00 UTC (rev 22307)
+++ gnucash/trunk/packaging/win32/build_tags_git.sh	2012-08-14 15:14:12 UTC (rev 22308)
@@ -84,9 +84,6 @@
   echo -n 'GLOBAL_DIR=c:\\soft\\gnucash-' >> ${w32pkg}/custom.sh
   echo "${tag}" >> ${w32pkg}/custom.sh
 
-  # No need to update the sources we just checked out
-  echo "UPDATE_SOURCES=no" >> ${w32pkg}/custom.sh
-
   # BUILD_FROM_TARBALL is special:
   # in install.sh place we check !=yes, in defaults.sh =yes, in dist.sh =no
   # We want it to look like 'no' in install and defaults, but yes in dist

Modified: gnucash/trunk/packaging/win32/daily_build.sh
===================================================================
--- gnucash/trunk/packaging/win32/daily_build.sh	2012-08-12 23:21:00 UTC (rev 22307)
+++ gnucash/trunk/packaging/win32/daily_build.sh	2012-08-14 15:14:12 UTC (rev 22308)
@@ -1,12 +1,24 @@
 #!/bin/sh
 #
-# Note: for this script to work, you need to make sure bash can
-#       find svn on your system. If it's not in the default
-#       Windows path, you will have to add it yourself, for
-#       example like this:
-#       - create a file /etc/profile.d/svn.sh
-#       - add this line: export PATH=/c/soft/svn/bin:$PATH
-#       (Use the real path to your svn installation, obviously)
+# Notes:
+# 1. for this script to work, you need to make sure bash can
+#    find svn on your system. If it's not in the default
+#    Windows path, you will have to add it yourself, for
+#    example like this:
+#    - create a file /etc/profile.d/svn.sh
+#    - add this line: export PATH=/c/soft/svn/bin:$PATH
+#    (Use the real path to your svn installation, obviously)
+#
+# 2. The recommended setup is to call this script from within the
+#    source code repository (packaging/win32 directory). This is
+#    different from before, where it was assumed to be called
+#    from outside the source code repository. To remain some
+#    compatibility with the old way, svn update is called twice
+#    - once for the repository (to update all)
+#    - once for the build scripts (to also update the build scripts
+#       using the old way)
+#    The second invocation is superfluous if this script was called
+#    from within the source code repository.
 
 set -e
 
@@ -15,6 +27,14 @@
 function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
 
 qpushd "$(dirname $(unix_path "$0"))"
+. functions.sh
+. defaults.sh
+
+qpushd "$REPOS_DIR"
 svn update
+qpopd
+
+svn update
+
 ./build_package.sh
 qpopd

Modified: gnucash/trunk/packaging/win32/defaults.sh
===================================================================
--- gnucash/trunk/packaging/win32/defaults.sh	2012-08-12 23:21:00 UTC (rev 22307)
+++ gnucash/trunk/packaging/win32/defaults.sh	2012-08-14 15:14:12 UTC (rev 22308)
@@ -29,10 +29,7 @@
     fi
 fi
 
-# only change this to "yes" if you are using install.sh from the outside the repository checkout
-set_default UPDATE_SOURCES noyes
 if [ "$BUILD_FROM_TARBALL" = "yes" ]; then
-    UPDATE_SOURCES=no
     set_default GNUCASH_DIR "$(wpwd ..\\..)"
     set_default REPOS_DIR $GNUCASH_DIR
     # keep this pointing from BUILD_DIR to REPOS_DIR
@@ -43,7 +40,7 @@
     # keep this pointing from BUILD_DIR to REPOS_DIR
     set_default REL_REPOS_DIR ..\\repos
 
-    set_default REPOS_TYPE svn
+    set_default REPOS_TYPE "git"
     if [ "$REPOS_TYPE" = "git" ]; then
       set_default GIT_REV "trunk"
       set_default REPOS_URL "git://github.com/Gnucash/gnucash.git"

Modified: gnucash/trunk/packaging/win32/install-impl.sh
===================================================================
--- gnucash/trunk/packaging/win32/install-impl.sh	2012-08-12 23:21:00 UTC (rev 22307)
+++ gnucash/trunk/packaging/win32/install-impl.sh	2012-08-14 15:14:12 UTC (rev 22308)
@@ -1453,46 +1453,6 @@
     fi
 }
 
-function git_up() {
-    mkdir -p $_REPOS_UDIR
-    qpushd $_REPOS_UDIR
-    if [ -x .git ]; then
-        setup "git update in ${REPOS_DIR}"
-#       IMPORTANT: the update mechanism from git
-#                  has been kept deliberately simple.
-#
-#       It assumes you are working as a non-committer
-#       (see http://wiki.gnucash.org/wiki/Git for what that means)
-#       and will simply try to pull the current branch from
-#       the upstream repository.
-#       If you are a committer (and intend to commit from your Windows
-#       git clone) you should disable updates from the build scripts
-#       and manually update using the git-update script.
-#       FIXME the last part needs perl 5.8 and some config tweaks for
-#             perl to find git's Git.pm
-#             msys-dtk installed by default only has perl 5.6.
-        $GIT_CMD pull origin
-    else
-        setup git clone
-        $GIT_CMD clone $REPOS_URL .
-        $GIT_CMD checkout $GIT_REV .
-    fi
-    qpopd
-}
-
-function svn_up() {
-    mkdir -p $_REPOS_UDIR
-    qpushd $_REPOS_UDIR
-    if [ -x .svn ]; then
-        setup "svn update in ${REPOS_DIR}"
-        svn up -r ${SVN_REV}
-    else
-        setup svn co
-        svn co -r ${SVN_REV} $REPOS_URL .
-    fi
-    qpopd
-}
-
 function inst_cutecash() {
     setup Cutecash
     _BUILD_UDIR=`unix_path $CUTECASH_BUILD_DIR`

Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh	2012-08-12 23:21:00 UTC (rev 22307)
+++ gnucash/trunk/packaging/win32/install.sh	2012-08-14 15:14:12 UTC (rev 22308)
@@ -111,15 +111,6 @@
 add_step inst_webkit
 
 ##
-if [ "$UPDATE_SOURCES" = "yes" ]; then
-  if [ "$REPOS_TYPE" = "git" ]; then
-    add_step git_up
-  elif [ "$REPOS_TYPE" = "svn" ]; then
-    add_step svn_up
-  else
-    die "Unkown repos type $REPOS_TYPE. Sources can only be updated for git or svn type repos"
-  fi
-fi
 if [ "$WITH_CUTECASH" = "yes" ]; then
  add_step inst_cmake
  add_step inst_cutecash



More information about the gnucash-changes mailing list