Author: wade
Date: 2008-01-24 18:26:59 -0500 (Thu, 24 Jan 2008)
New Revision: 93860

Modified:
   trunk/release/packaging/do-install-zip-pkgs
Log:
Now update indentation... (no code changes)


Modified: trunk/release/packaging/do-install-zip-pkgs
===================================================================
--- trunk/release/packaging/do-install-zip-pkgs 2008-01-24 23:24:01 UTC (rev 
93859)
+++ trunk/release/packaging/do-install-zip-pkgs 2008-01-24 23:26:59 UTC (rev 
93860)
@@ -195,69 +195,69 @@
 # Only look at mach-o files
 for path_on_disk in native_filelist:
 
-                       utils.debug=0
+       utils.debug=0
 
-                       old_filename = os.path.abspath('/tmp/install/%s' % 
(path_on_disk) )
-                       new_filename = os.path.abspath( re.sub('/tmp/install', 
reloc, old_filename) )
+       old_filename = os.path.abspath('/tmp/install/%s' % (path_on_disk) )
+       new_filename = os.path.abspath( re.sub('/tmp/install', reloc, 
old_filename) )
 
-                       print 'Relocating %s' % path_on_disk
-                       utils.launch_process('install_name_tool -id %s %s' % 
(new_filename, path_on_disk ) )
+       print 'Relocating %s' % path_on_disk
+       utils.launch_process('install_name_tool -id %s %s' % (new_filename, 
path_on_disk ) )
 
-                       # Get update references (So we don't try to change 
reference to ourselves)
-                       (code, otool_output) = utils.launch_process('otool -L 
%s' % path_on_disk, print_output=0 )
-                       #print output
+       # Get update references (So we don't try to change reference to 
ourselves)
+       (code, otool_output) = utils.launch_process('otool -L %s' % 
path_on_disk, print_output=0 )
+       #print output
 
-                       # libmono-profile-cov is still having an issue getting 
relocated... check this website for a possible solution:
-                       # 
http://lists.apple.com/archives/darwin-development/2003/Sep/msg00274.html
-                       
-                       # -Wl,-header-pad_max_install_names ... didn't work... 
?  Resorting to using @executable_path for anything that files with full path
+       # libmono-profile-cov is still having an issue getting relocated... 
check this website for a possible solution:
+       # 
http://lists.apple.com/archives/darwin-development/2003/Sep/msg00274.html
+       
+       # -Wl,-header-pad_max_install_names ... didn't work... ?  Resorting to 
using @executable_path for anything that files with full path
 
-                       # Our prefixes to search and replace
-                       prefixes = [ '/tmp/install', '/tmp/build_deps', 
mac_prefix_regex, "@executable_path/.." ]
-                       for prefix in prefixes:
-                               #print "Prefix: %s" % prefix
-                               # Update /tmp/install references to the new 
target location
-                               #Sample output: 
/tmp/install/lib/libjpeg.62.dylib (compatibility version 63.0.0, current 
version 63.0.0)
-                               #print "otool_output: '%s'" % otool_output
-                               #print prefix
-                               for match in re.compile('\s+(%s/(.*?)) \(' % 
prefix, re.S | re.M).finditer(otool_output):
-                                       #print "Found Match1: %s " % 
match.group(1)
-                                       #print "Found Match2: %s " % 
match.group(2)
+       # Our prefixes to search and replace
+       prefixes = [ '/tmp/install', '/tmp/build_deps', mac_prefix_regex, 
"@executable_path/.." ]
+       for prefix in prefixes:
+               #print "Prefix: %s" % prefix
+               # Update /tmp/install references to the new target location
+               #Sample output: /tmp/install/lib/libjpeg.62.dylib 
(compatibility version 63.0.0, current version 63.0.0)
+               #print "otool_output: '%s'" % otool_output
+               #print prefix
+               for match in re.compile('\s+(%s/(.*?)) \(' % prefix, re.S | 
re.M).finditer(otool_output):
+                       #print "Found Match1: %s " % match.group(1)
+                       #print "Found Match2: %s " % match.group(2)
 
-                                       full_path = match.group(1)
-                                       prefix_on_path = match.group(2)
+                       full_path = match.group(1)
+                       prefix_on_path = match.group(2)
 
-                                       # This almost works... except for 
libmono-profiler-cov's reference to libintl
-                                       command1 = 'install_name_tool -change 
%s %s/%s %s' % (full_path, reloc, prefix_on_path, path_on_disk) 
+                       # This almost works... except for 
libmono-profiler-cov's reference to libintl
+                       command1 = 'install_name_tool -change %s %s/%s %s' % 
(full_path, reloc, prefix_on_path, path_on_disk) 
 
-                                       # As expected, this command fails 
because the reference names are too long.  using @executable_path greatly 
shortens the string length
-                                       #command = 'install_name_tool -change 
%s /bunch/of/junk%s/%s %s' % (full_path, reloc, prefix_on_path, path_on_disk) 
-                                       #print command1
-                                       if not relative_paths: (code, output) = 
utils.launch_process(command1)
+                       # As expected, this command fails because the reference 
names are too long.  using @executable_path greatly shortens the string length
+                       #command = 'install_name_tool -change %s 
/bunch/of/junk%s/%s %s' % (full_path, reloc, prefix_on_path, path_on_disk) 
+                       #print command1
+                       if not relative_paths: (code, output) = 
utils.launch_process(command1)
 
-                                       if code or relative_paths:
-                                               #print "*** WARNING *** 
problems executing: %s" % command1
-                                               #print "Falling back to 
@executable_path with install_name_tool ... "
+                       if code or relative_paths:
+                               #print "*** WARNING *** problems executing: %s" 
% command1
+                               #print "Falling back to @executable_path with 
install_name_tool ... "
 
-                                               # This string is shorter so it 
works with libmono-profiler-cov
-                                               # But doesn't seem to work when 
I install to /tmp/build_deps... (libgdiplus configure test for libtiff fails)
-                                               command2 = 'install_name_tool 
-change %s @executable_path/../%s %s' % (full_path, prefix_on_path, 
path_on_disk) 
-                                               (code, output) = 
utils.launch_process(command2)
-                                               if code:
-                                                       print "*** ERROR *** 
problems executing: %s" % command2
-                                                       sys.exit(1)
-                                               
+                               # This string is shorter so it works with 
libmono-profiler-cov
+                               # But doesn't seem to work when I install to 
/tmp/build_deps... (libgdiplus configure test for libtiff fails)
+                               command2 = 'install_name_tool -change %s 
@executable_path/../%s %s' % (full_path, prefix_on_path, path_on_disk) 
+                               (code, output) = utils.launch_process(command2)
+                               if code:
+                                       print "*** ERROR *** problems 
executing: %s" % command2
+                                       sys.exit(1)
                                
+               
 
-                       #  Final check, make sure that each reference has a 
valid prefix
-                       (code, output) = utils.launch_process('otool -L %s' % 
path_on_disk, print_output=0)
-                       output_array = output.split('\n')
-                       for i in range(1, len(output_array)):
-                               if not 
re.compile('(%s|\/usr|\/System|@executable_path)' % 
reloc).search(output_array[i]):
-                                       print reloc
-                                       print "Relocating %s failed:" % 
path_on_disk
-                                       print output
-                                       sys.exit(1)
+       #  Final check, make sure that each reference has a valid prefix
+       (code, output) = utils.launch_process('otool -L %s' % path_on_disk, 
print_output=0)
+       output_array = output.split('\n')
+       for i in range(1, len(output_array)):
+               if not re.compile('(%s|\/usr|\/System|@executable_path)' % 
reloc).search(output_array[i]):
+                       print reloc
+                       print "Relocating %s failed:" % path_on_disk
+                       print output
+                       sys.exit(1)
 
 
 # Avoids "Application Error" on win32 and allows scripts to be run

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

Reply via email to