[62231] branches/release_1_8/base
ryandesign at macports.org
ryandesign at macports.org
Fri Jan 1 03:26:49 PST 2010
Revision: 62231
http://trac.macports.org/changeset/62231
Author: ryandesign at macports.org
Date: 2010-01-01 03:26:48 -0800 (Fri, 01 Jan 2010)
Log Message:
-----------
portutil.tcl: merge r58776, r58777, r58788 from trunk: improve merge proc to add a new error message, support paths with spaces, and support symlinks on Snow Leopard
Revision Links:
--------------
http://trac.macports.org/changeset/58776
http://trac.macports.org/changeset/58777
http://trac.macports.org/changeset/58788
Modified Paths:
--------------
branches/release_1_8/base/ChangeLog
branches/release_1_8/base/src/port1.0/portutil.tcl
Property Changed:
----------------
branches/release_1_8/base/
Property changes on: branches/release_1_8/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,55825,56147,56160,56162,56435,56448,56472-56474,56666,56889,57026,57048,57055,57131,57255,57436,57441,57784,57801,57820,57871,57974,57979,57982,58093,58445,59318,59585,59597,59654,60259-60260,60774,60798,61302,61385,61770,62172,62194,62220
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,55825,56147,56160,56162,56435,56448,56472-56474,56666,56889,57026,57048,57055,57131,57255,57436,57441,57784,57801,57820,57871,57974,57979,57982,58093,58445,58776-58777,58788,59318,59585,59597,59654,60259-60260,60774,60798,61302,61385,61770,62172,62194,62220,62230
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/release_1_8/base/ChangeLog
===================================================================
--- branches/release_1_8/base/ChangeLog 2010-01-01 11:24:54 UTC (rev 62230)
+++ branches/release_1_8/base/ChangeLog 2010-01-01 11:26:48 UTC (rev 62231)
@@ -3,6 +3,12 @@
# $Id$
###
+Release 1.8.3 (unreleased):
+
+ - Fixed 'merge' proc for paths with spaces, and for symlinks on Snow
+ Leopard, and added an error message for when 'merge' is not called
+ correctly (ryandesign in r58776, r58777, r58778)
+
Release 1.8.2 (2010-01-01 by jmr):
- Fixed 'port load' for non-root installations (#21713, jmr in r60774)
Modified: branches/release_1_8/base/src/port1.0/portutil.tcl
===================================================================
--- branches/release_1_8/base/src/port1.0/portutil.tcl 2010-01-01 11:24:54 UTC (rev 62230)
+++ branches/release_1_8/base/src/port1.0/portutil.tcl 2010-01-01 11:26:48 UTC (rev 62231)
@@ -2184,12 +2184,11 @@
# e.g. 'merge_lipo ${workpath}/pre-dest ${destroot} ${prefix}/bin/pstree i386 ppc
# will merge binary files with lipo which have to be in the same (relative) path
proc merge_lipo {base target file archs} {
- set exec-lipo ""
+ set exec-lipo [list [findBinary lipo $portutil::autoconf::lipo_path]]
foreach arch ${archs} {
- set exec-lipo [concat ${exec-lipo} [list "-arch" "${arch}" "${base}/${arch}${file}"]]
+ lappend exec-lipo -arch ${arch} ${base}/${arch}${file}
}
- set exec-lipo [concat ${exec-lipo}]
- system "[findBinary lipo $portutil::autoconf::lipo_path] ${exec-lipo} -create -output ${target}${file}"
+ eval exec ${exec-lipo} [list -create -output ${target}${file}]
}
# private function
@@ -2234,6 +2233,9 @@
set base_arch ${arch}
}
}
+ if {"" == ${base_arch}} {
+ return -code error [format [msgcat::mc "Cannot merge because directory '%s' contains no architecture directories."] ${base}]
+ }
ui_debug "merging architectures ${archs}, base_arch is ${base_arch}"
# traverse the base-architecture directory
@@ -2242,30 +2244,34 @@
set fpath [string range "${file}" [string length "${basepath}"] [string length "${file}"]]
if {${fpath} != ""} {
# determine the type (dir/file/link)
- set filetype [exec [findBinary file $portutil::autoconf::file_path] "-b" "${basepath}${fpath}"]
- switch -regexp ${filetype} {
+ switch [file type ${basepath}${fpath}] {
directory {
# just create directories
ui_debug "mrg: directory ${fpath}"
file mkdir "${destroot}${fpath}"
}
- symbolic\ link.* {
+ link {
# copy symlinks, TODO: check if targets match!
ui_debug "mrg: symlink ${fpath}"
file copy "${basepath}${fpath}" "${destroot}${fpath}"
}
- Mach-O.* {
- merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
- }
- current\ ar\ archive {
- merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
- }
- ASCII\ C\ program\ text {
- merge_cpp "${base}" "${destroot}" "${fpath}" "${archs}"
- }
default {
- ui_debug "unknown file type: ${filetype}"
- merge_file "${base}" "${destroot}" "${fpath}" "${archs}"
+ set filetype [exec [findBinary file $portutil::autoconf::file_path] "-b" "${basepath}${fpath}"]
+ switch -regexp ${filetype} {
+ Mach-O.* {
+ merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
+ }
+ current\ ar\ archive {
+ merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
+ }
+ ASCII\ C\ program\ text {
+ merge_cpp "${base}" "${destroot}" "${fpath}" "${archs}"
+ }
+ default {
+ ui_debug "unknown file type: ${filetype}"
+ merge_file "${base}" "${destroot}" "${fpath}" "${archs}"
+ }
+ }
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100101/3af34ab7/attachment.html>
More information about the macports-changes
mailing list