[140676] trunk/base/src/port1.0/porttrace.tcl
jmr at macports.org
jmr at macports.org
Tue Sep 29 20:38:56 PDT 2015
Revision: 140676
https://trac.macports.org/changeset/140676
Author: jmr at macports.org
Date: 2015-09-29 20:38:56 -0700 (Tue, 29 Sep 2015)
Log Message:
-----------
follow-up to r129924: use realpath in porttrace::appendEntry instead of reimplementing it
Revision Links:
--------------
https://trac.macports.org/changeset/129924
Modified Paths:
--------------
trunk/base/src/port1.0/porttrace.tcl
Modified: trunk/base/src/port1.0/porttrace.tcl
===================================================================
--- trunk/base/src/port1.0/porttrace.tcl 2015-09-30 03:30:54 UTC (rev 140675)
+++ trunk/base/src/port1.0/porttrace.tcl 2015-09-30 03:38:56 UTC (rev 140676)
@@ -67,29 +67,15 @@
# Escape equal signs with \=
lappend mapping "=" "\\="
- set normalizedPath [file normalize $path]
# file normalize will leave symlinks as the very last
# path component intact. This will, for instance, prevent /tmp from
# being resolved to /private/tmp.
- # Also use file readlink to counter this behavior.
- # file readlink returns an error, if the last component is not
- # a symlink. Catch that.
- set resolvedPath {}
- if {![catch {file readlink $path}]} {
- set resolvedPath [file readlink $path]
-
- if {[string length $resolvedPath] > 0 && [string index $resolvedPath 0] ne "/"} {
- # Canonicalize.
- set resolvedPath [file normalize [file dirname $path]/$resolvedPath]
- }
- }
+ # Use realpath to avoid this behavior.
+ set normalizedPath [realpath $path]
lappend sndbxlst "[string map $mapping $path]=$action"
if {$normalizedPath ne $path} {
lappend sndbxlst "[string map $mapping $normalizedPath]=$action"
}
- if {[string length $resolvedPath] > 0 && $resolvedPath ne $path} {
- lappend sndbxlst "[string map $mapping $resolvedPath]=$action"
- }
}
##
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150929/fb467810/attachment.html>
More information about the macports-changes
mailing list