New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 80264


Ignore:
Timestamp:
07/07/11 21:34:06 (4 years ago)
Author:
fotanus@…
Message:

Perry code review results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc11-post-destroot/base/src/port1.0/portcheckdestroot.tcl

    r79793 r80264  
    44package provide portcheckdestroot 1.0 
    55package require portutil 1.0 
     6 
    67 
    78set org.macports.checkdestroot [target_new org.macports.checkdestroot portcheckdestroot::checkdestroot_main] 
     
    2526    if { [getuid] == 0 && [geteuid] != 0 } { 
    2627        # if started with sudo but have dropped the privileges 
    27         ui_debug "Can't run destroot under sudo without elevated privileges (due to mtree)." 
     28        ui_debug "Can't run checkdestroot under sudo without elevated privileges (due to mtree)." 
    2829        ui_debug "Run destroot without sudo to avoid root privileges." 
    2930        ui_debug "Going to escalate privileges back to root." 
     
    3233        ui_debug "euid changed to: [geteuid]. egid changed to: [getegid]." 
    3334    } 
     35} 
     36 
     37# List contents for a given port. 
     38proc portcheckdestroot::get_port_files {portname} { 
    3439} 
    3540 
     
    4651# escape chars in order to be usable as regexp. This function is for internal use. 
    4752proc portcheckdestroot::escape_chars {str} { 
    48     return [regsub {\+} $str {\+}] 
     53    return [regsub -all {\W} $str {\\&}] 
    4954} 
    5055 
     
    6974    foreach item [glob -nocomplain -type "d $type" -directory $dir *] { 
    7075        if {[file isdirectory $item]} { 
    71             set ret [concat $ret [types_list $item $type]] 
     76            set ret [concat $ret [types_list $item $type $bin]] 
    7277        } else { 
    7378            #is from the correct type 
     
    235240    set dep_files {} 
    236241    foreach dep [get_dependencies] { 
    237         lappend dep_files [get_files [exec port contents $dep]] 
     242        lappend dep_files [registry_port_registered $dep] 
    238243    } 
    239244    set self_files [bin_list $destroot$prefix] 
Note: See TracChangeset for help on using the changeset viewer.