Author: wade
Date: 2007-07-19 16:52:06 -0400 (Thu, 19 Jul 2007)
New Revision: 82325

Modified:
   trunk/release/packaging/do-msvn-tar
   trunk/release/packaging/mktarball
Log:
mktarball:
do-msvn-tar:
-do tarball creation under another dir under /tmp/monobuild.
 /tmp/monobuild can't be removed.  This is the same
 as ./build does.  Also, rename some dirs to be more
 descriptive.



Modified: trunk/release/packaging/do-msvn-tar
===================================================================
--- trunk/release/packaging/do-msvn-tar 2007-07-19 20:51:37 UTC (rev 82324)
+++ trunk/release/packaging/do-msvn-tar 2007-07-19 20:52:06 UTC (rev 82325)
@@ -10,18 +10,22 @@
 import glob
 import distutils.dir_util
 
+sys.path.append('.')
+
 import packaging
 
 (HEAD_or_RELEASE, package, version) = sys.argv[1:]
 
+os.chdir('source_dist_creator')
+
+temp_dir = os.getcwd()
+
 dummy_env = ""
 package_obj = packaging.package(dummy_env, package, inside_jail=True)
 
-temp_dir = os.getcwd()
+os.mkdir('src')
+os.chdir('src')
 
-os.mkdir('tarball-creation')
-os.chdir('tarball-creation')
-
 # Construct subversion path of location we want to create a tarball from
 svn_paths = []
 if HEAD_or_RELEASE == "HEAD":
@@ -96,7 +100,7 @@
 
 get_source = package_obj.get_info_var('get_source')
 
-# pwd: /tmp/monobuild/tarball-creation
+# pwd: /tmp/monobuild/source_dist_creator/src
 
 ### Execute the source creating functions ###
 def_file = temp_dir + os.sep + package
@@ -106,8 +110,8 @@
        print "Command: %s" % get_source
        os.system(get_source)
 else:
-       # Put cachedir up one level so it will remain through cleanup
-       cache_dir = os.path.abspath( os.path.join(temp_dir, "..", "src_cache", 
package, HEAD_orRELEASE) )
+       # Put cachedir up two levels so it will remain through cleanup
+       cache_dir = os.path.abspath( os.path.join(temp_dir, "..", "..", 
"src_cache", package, HEAD_or_RELEASE) )
        for path in svn_paths:
                module = os.path.basename(path)
 
@@ -151,7 +155,7 @@
 if HEAD_or_RELEASE == "HEAD":
        os.system(update_version_file )
 
-# pwd: /tmp/tarball-creation/$build_dir
+# pwd: /tmp/monobuild/source_dist_creator/src/$build_dir
 
 # make_dist
 os.system(make_dist)
@@ -159,13 +163,13 @@
 ### End of source creating functions ###
 
 ### Finish moving things around
-os.mkdir(temp_dir + '/built-tarball')
+os.mkdir(temp_dir + '/result')
 
 found_source_file = 0
 source_files = glob.glob('*.zip') + glob.glob('*.tar.gz') + 
glob.glob('*.tar.bz2')
 
 if len(source_files) == 1:
-       os.rename(source_files[0], temp_dir + '/built-tarball/%s' % 
source_files[0])
+       os.rename(source_files[0], temp_dir + '/result/%s' % source_files[0])
        found_source_file = 1
        print "print source filename..."
        print source_files[0]

Modified: trunk/release/packaging/mktarball
===================================================================
--- trunk/release/packaging/mktarball   2007-07-19 20:51:37 UTC (rev 82324)
+++ trunk/release/packaging/mktarball   2007-07-19 20:52:06 UTC (rev 82325)
@@ -91,24 +91,30 @@
                repo.add_file(HEAD_or_RELEASE, package, version, "failure")
                sys.exit(3)
 
-temp_dir = conf.env_vars['build_location']
+temp_dir = conf.env_vars['build_location'] + os.sep + 'source_dist_creator'
 
 # Clean up
 conf.buildenv.execute_command("rm -Rf %s" % temp_dir)
 
 # Copy some files over and execute!
 # Also copy over def_alias files
-files_to_copy = [ 'distro_source_key', 'do-msvn-tar', 'defs/%s' % package] + 
glob.glob('../pyutils/*.py') 
+files_to_copy = [ 'distro_source_key', 'do-msvn-tar', 'defs/%s' % package]
 for f in package_obj.get_aliases():
        files_to_copy += ['defs/' + f ]
+
+support_files_to_copy = []
+for i in 'buildenv.py config.py logger.py network.py packaging.py 
shell_parse.py utils.py'.split():
+       support_files_to_copy += ['../pyutils/' + i]
+
 # This command also creates the dest dir
+conf.buildenv.copy_to(support_files_to_copy, conf.env_vars['build_location'], 
mode='scp')
 conf.buildenv.copy_to(files_to_copy, temp_dir, mode='scp')
 
 log_obj.log("Starting to build source dist...\n")
 # they key needs to be owned by the user so ssh doesn't reject the key
 (status, output) = conf.buildenv.execute_command('chown %s 
%s/distro_source_key' % (conf.info['username'], temp_dir), exec_as_root=1)
 (status, output) = conf.buildenv.execute_command('mount /proc &> /dev/null', 
exec_as_root=1)
-(status, output) = conf.buildenv.execute_command('./do-msvn-tar %s %s %s' % 
(HEAD_or_RELEASE, package, version), working_dir=temp_dir)
+(status, output) = conf.buildenv.execute_command('%s/do-msvn-tar %s %s %s' % 
(temp_dir, HEAD_or_RELEASE, package, version) )
 
 if status:
         conf.buildenv.unlock_env()
@@ -121,7 +127,7 @@
 
 # Copy file back
 #  Note: the tarball var is expected to have be in this format, ex:  
mono-1.1.13.4.tar.gz
-conf.buildenv.copy_from('%s/built-tarball/%s' % (temp_dir, tarball), 
package_obj.source_fullpath)
+conf.buildenv.copy_from('%s/result/%s' % (temp_dir, tarball), 
package_obj.source_fullpath)
 
 # Keep a map of which params produce which tarball
 repo.add_file(HEAD_or_RELEASE, package, version, package_obj.source_relpath + 
os.sep + tarball)

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

Reply via email to