[83624] trunk/dports/_resources/port1.0/group/app-1.0.tcl
ryandesign at macports.org
ryandesign at macports.org
Wed Sep 7 16:30:21 PDT 2011
Revision: 83624
http://trac.macports.org/changeset/83624
Author: ryandesign at macports.org
Date: 2011-09-07 16:30:20 -0700 (Wed, 07 Sep 2011)
Log Message:
-----------
app-1.0.tcl: fix error when app.executable refers to a symlink in the destroot and a previous version of the port is not already installed (#31157)
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/app-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/app-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/app-1.0.tcl 2011-09-07 22:31:31 UTC (rev 83623)
+++ trunk/dports/_resources/port1.0/group/app-1.0.tcl 2011-09-07 23:30:20 UTC (rev 83624)
@@ -211,7 +211,7 @@
}
# If app.executable is in the destroot, link to it.
- if {[file exists ${destroot}${executable}]} {
+ if {[file exists ${destroot}[app._resolve_symlink ${executable} ${destroot}]]} {
ln -s ${executable} ${destroot}${applications_dir}/${app.name}.app/Contents/MacOS/${app.name}
} elseif {[file exists ${executable}]} {
# If app.executable starts with ${workpath} or ${filespath}, copy it.
@@ -279,3 +279,14 @@
depends_build-append port:makeicns
}
}
+
+
+# Recursively resolve a symlink in a destroot.
+proc app._resolve_symlink {path destroot} {
+ if {[catch {set resolved_path [file join [file dirname ${path}] [file readlink ${destroot}${path}]]}]} {
+# ui_debug "In ${destroot}, ${path} is not a symlink"
+ return ${path}
+ }
+# ui_debug "In ${destroot}, ${path} is a symlink to ${resolved_path}"
+ return [app._resolve_symlink ${resolved_path} ${destroot}]
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110907/5d7157ff/attachment-0001.html>
More information about the macports-changes
mailing list