Author: wade
Date: 2006-11-08 03:00:34 -0500 (Wed, 08 Nov 2006)
New Revision: 67509

Modified:
   trunk/release/packaging/build
   trunk/release/packaging/defs/ironpython
   trunk/release/packaging/defs/nant
Log:
defs/*:
-add APPEND_ZERO_TO_RPM_VERSION option to add .0 to the end of the version, 
without changing the source selection rules
 (nant needed this, and ironpython needed it for 1.0, but not 1.0.1)

build:
-implement above change
-don't run cleanup step if it isn't defined



Modified: trunk/release/packaging/build
===================================================================
--- trunk/release/packaging/build       2006-11-08 06:27:58 UTC (rev 67508)
+++ trunk/release/packaging/build       2006-11-08 08:00:34 UTC (rev 67509)
@@ -108,10 +108,6 @@
        serial = remaining_args[3]
 else:  serial = "0"
 
-if serial == "0":
-       ver_path = version
-else:
-       ver_path = version + "-" + serial
 
 # Figure out if this is a snapshot build or not...
 #  Could do this by looking at the tarball map... ? (but ./build parameters 
would have to change)
@@ -145,6 +141,15 @@
 build_env = packaging.buildenv(distro)
 package = packaging.package(build_env, package_name, 
HEAD_or_RELEASE=HEAD_or_RELEASE)
 
+# Hack to for some numbering schemes (nant, ironpython) to be rpm version 
sorting friendly
+if package.get_info_var('APPEND_ZERO_TO_RPM_VERSION'):
+       version += '.0'
+
+if serial == "0":
+       ver_path = version
+else:
+       ver_path = version + "-" + serial
+
 # check to see if this package is a valid build
 if not package.valid_build_platform(distro):
        print "%s is not in BUILD_HOSTS" % distro
@@ -289,7 +294,8 @@
        state = get_state(code)
        print "Build failed, see log in %s for details" % LOGFILE
        build_info.update_step("build", state=state, finish=utils.get_time())
-       run_postbuild_step('clean-up', 'CLEAN_UP')
+       if package.get_info_var('CLEAN_UP'):
+               run_postbuild_step('clean-up', 'CLEAN_UP')
        build_info.update_build(state="failure", finish=utils.get_time())
        sys.exit(7)
 
@@ -321,7 +327,8 @@
                counter += 1
 
 # Run cleanup step
-run_postbuild_step('clean-up', 'CLEAN_UP')
+if package.get_info_var('CLEAN_UP'):
+       run_postbuild_step('clean-up', 'CLEAN_UP')
 
 state = build_info.get_collective_state()
 build_info.update_build(state=state, finish=utils.get_time())

Modified: trunk/release/packaging/defs/ironpython
===================================================================
--- trunk/release/packaging/defs/ironpython     2006-11-08 06:27:58 UTC (rev 
67508)
+++ trunk/release/packaging/defs/ironpython     2006-11-08 08:00:34 UTC (rev 
67509)
@@ -16,6 +16,10 @@
        DEST_ROOT=noarch
 }
 
+# Some versions (like the 1.0) needed this
+# 1.0.1 doesn't
+#APPEND_ZERO_TO_RPM_VERSION=1
+
 BUILD_DIR="/tmp"
 
 make_dist () {

Modified: trunk/release/packaging/defs/nant
===================================================================
--- trunk/release/packaging/defs/nant   2006-11-08 06:27:58 UTC (rev 67508)
+++ trunk/release/packaging/defs/nant   2006-11-08 08:00:34 UTC (rev 67509)
@@ -8,6 +8,10 @@
        ALL
 )
 
+# nant uses a numbering scheme that rpm doesn't like for upgrade paths
+#  we'll have to manually tweak this here and there
+APPEND_ZERO_TO_RPM_VERSION=1
+
 # Should we build all this noarch stuff on the 1.1.13 bundle?
 #bundle="1.1.13"
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to