Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12744 (new defect)

Opened 13 months ago

Last modified 5 months ago

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

Changed 13 months ago by nox@…

  • cc david.osguthorpe@…, nox@… added
  • priority changed from Not set to Normal
  • summary changed from porttrace does not work if the darwinports paths contain symbolic links to porttrace does not work if the macports paths contain symbolic links
  • milestone set to MacPorts base bugs

David, are you really running MacPorts 1.4.42?!

Changed 13 months ago by david.osguthorpe@…

No - I guess its 1.42 - but I didnt type this in - this was what the Trac report page has in its version list which seemed to be most reasonable - its the last one before 1.5

Changed 5 months ago by nox@…

  • version 1.4.42 deleted
Note: See TracTickets for help on using tickets.