Ticket #8763: regclean.diff
File regclean.diff, 2.4 KB (added by jmroot (Joshua Root), 16 years ago) |
---|
-
src/port/port.tcl
2063 2063 } 2064 2064 2065 2065 2066 proc action_regclean { action portlist opts } { 2067 # Clean up the registry. Currently this just means removing duplicate 2068 # dep_map entries. 2069 registry::open_dep_map 2070 registry::clean_dep_map 2071 registry::write_dep_map 2072 2073 return 0 2074 } 2075 2076 2066 2077 proc action_portcmds { action portlist opts } { 2067 2078 # Operations on the port's directory and Portfile 2068 2079 global env boot_env … … 2348 2359 search action_search 2349 2360 list action_list 2350 2361 2362 regclean action_regclean 2363 2351 2364 ed action_portcmds 2352 2365 edit action_portcmds 2353 2366 cat action_portcmds -
src/registry1.0/receipt_flat.tcl
750 750 set dep_map $new_map 751 751 } 752 752 753 # remove duplicate entries from the dep_map 754 # (could be put there by older versions of MacPorts) 755 proc clean_dep_map {args} { 756 variable dep_map 757 set new_map [list] 758 set oldlen [llength $dep_map] 759 ui_debug "Current dep_map has $oldlen entries" 760 foreach de $dep_map { 761 if {[lsearch -exact $new_map $de] == -1} { 762 lappend new_map $de 763 } else { 764 ui_debug "Removing $de from dep_map" 765 } 766 } 767 set dep_map $new_map 768 769 set newlen [llength $dep_map] 770 set diff [expr $oldlen - $newlen] 771 ui_debug "New dep_map has $newlen entries" 772 ui_info "Removed $diff duplicate entries from the dependency map" 773 } 774 753 775 proc write_dep_map {args} { 754 776 global macports::registry.path 755 777 variable dep_map -
src/registry1.0/registry.tcl
370 370 return [${macports::registry.format}::unregister_dep $dep $type $port] 371 371 } 372 372 373 proc clean_dep_map {args} { 374 global macports::registry.format 375 return [${macports::registry.format}::clean_dep_map $args] 376 } 377 373 378 proc write_dep_map {args} { 374 379 global macports::registry.format 375 380 return [${macports::registry.format}::write_dep_map $args]