Changeset 80264
- Timestamp:
- 07/07/11 21:34:06 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-post-destroot/base/src/port1.0/portcheckdestroot.tcl
r79793 r80264 4 4 package provide portcheckdestroot 1.0 5 5 package require portutil 1.0 6 6 7 7 8 set org.macports.checkdestroot [target_new org.macports.checkdestroot portcheckdestroot::checkdestroot_main] … … 25 26 if { [getuid] == 0 && [geteuid] != 0 } { 26 27 # 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)." 28 29 ui_debug "Run destroot without sudo to avoid root privileges." 29 30 ui_debug "Going to escalate privileges back to root." … … 32 33 ui_debug "euid changed to: [geteuid]. egid changed to: [getegid]." 33 34 } 35 } 36 37 # List contents for a given port. 38 proc portcheckdestroot::get_port_files {portname} { 34 39 } 35 40 … … 46 51 # escape chars in order to be usable as regexp. This function is for internal use. 47 52 proc portcheckdestroot::escape_chars {str} { 48 return [regsub {\+} $str {\+}]53 return [regsub -all {\W} $str {\\&}] 49 54 } 50 55 … … 69 74 foreach item [glob -nocomplain -type "d $type" -directory $dir *] { 70 75 if {[file isdirectory $item]} { 71 set ret [concat $ret [types_list $item $type ]]76 set ret [concat $ret [types_list $item $type $bin]] 72 77 } else { 73 78 #is from the correct type … … 235 240 set dep_files {} 236 241 foreach dep [get_dependencies] { 237 lappend dep_files [ get_files [exec port contents $dep]]242 lappend dep_files [registry_port_registered $dep] 238 243 } 239 244 set self_files [bin_list $destroot$prefix]
Note: See TracChangeset
for help on using the changeset viewer.

