Ticket #12744 (new defect)
porttrace does not work if the macports paths contain symbolic links
| Reported by: | david.osguthorpe@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts base bugs |
| Component: | base | Version: | |
| Keywords: | porttrace symbolic link | Cc: | david.osguthorpe@…, nox@… |
| Port: |
Description
see comments in patch for bug issue if the darwinports destroot path components e.g. /opt or /opt/local/var/db/dports contain symbolic links then porttrace fails all files installed in the destroot the following is a patch which fixes this
This is on Mac OS X 10.3.9
--- porttrace.tcl.orig Sun Apr 29 13:44:55 2007
+++ porttrace.tcl Tue Aug 21 11:55:06 2007
@@ -42,6 +42,17 @@
ui_warn "trace requires Tcl Thread package ($error)"
} else {
global env trace_fifo trace_sandboxbounds
+ # major bug - the trace library uses the realpath function to make paths
+ # fully absolute - removing symbolic links - so we need to ensure
+ # workpath is also mapped to the actual path if it is a symbolic link
+ # or any part is a link
+ # currently only method looks to be to cd to workpath and do a pwd
+ ui_debug "porttrace: workpath is ${workpath}"
+ set mycurwd [pwd]
+ cd $workpath
+ set realworkpath [pwd]
+ cd $mycurwd
+ ui_debug "porttrace: realworkpath is ${realworkpath}"
# Create a fifo.
set trace_fifo "$workpath/trace_fifo"
file delete -force $trace_fifo
@@ -71,7 +82,7 @@
# /dev/null
# /dev/tty
# /Library/Caches/com.apple.Xcode
- set trace_sandboxbounds "/tmp:/private/tmp:/var/tmp:/private/var/tmp:/dev/null:/dev/tty:/Library/Caches/com.apple.Xcode:${workpath}"
+ set trace_sandboxbounds "/tmp:/private/tmp:/var/tmp:/private/var/tmp:/dev/null:/dev/tty:/Library/Caches/com.apple.Xcode:${realworkpath}"
if {[info exists env(TMPDIR)]} {
set trace_sandboxbounds "${trace_sandboxbounds}:$env(TMPDIR)"
}
Change History
Note: See
TracTickets for help on using
tickets.

