Ignore:
Timestamp:
Jul 21, 2005, 12:35:00 PM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Initial commit of porttrace based on ideas submitted on darwinports@ list.
new -t option will run targets with a trace thread and will output the list
of dependencies.

E.g. sudo port -t configure openvpn2 generates:

Warning: trace revealed a(n undeclared) dependency on lzo
Warning: trace revealed a(n undeclared) dependency on openssl
Warning: trace revealed a(n undeclared) dependency on zlib

Remark: at some point, I'd like to filter the dependencies that are declared
and only report undeclared dependencies.

Tested on 10.4.2 only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r13148 r13172  
    3535package require darwinports_dlist 1.0
    3636package require msgcat
     37package require porttrace 1.0
    3738
    3839global targets target_uniqid all_variants
     
    528529
    529530proc target_run {ditem} {
    530     global target_state_fd portpath portname portversion portrevision portvariants ports_force variations
     531    global target_state_fd portpath portname portversion portrevision portvariants ports_force variations workpath ports_trace
    531532    set result 0
    532533    set skipped 0
     
    600601                # otherwise execute the task.
    601602                if {$skipped == 0} {
     603                        if {([info exists ports_trace] && $ports_trace == "yes")} {
     604                                trace_start $workpath
     605                        }
     606
    602607                        # Execute pre-run procedure
    603608                        if {[ditem_contains $ditem prerun]} {
     
    630635                        ui_debug "Executing $postrun"
    631636                        set result [catch {$postrun $name} errstr]
     637                        }
     638
     639                        # Check dependencies.
     640                        if {([info exists ports_trace] && $ports_trace == "yes")} {
     641                                trace_check_deps {}
     642                        }
     643
     644                        if {([info exists ports_trace] && $ports_trace == "yes")} {
     645                                trace_stop
    632646                        }
    633647                }
Note: See TracChangeset for help on using the changeset viewer.