Changeset 81272
- Timestamp:
- 07/28/11 09:00:13 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
r81271 r81272 3749 3749 3750 3750 proc macports::revupgrade {args} { 3751 set run_loop 1 3752 array set broken_port_counts {} 3753 while {$run_loop == 1} { 3754 if {[catch {revupgrade_scanandrebuild broken_port_counts} run_loop] == 1} { 3755 ui_error "An error occured while scanning for broken ports and/or trying to rebuild them" 3756 error "An error occured while scanning for broken ports and/or trying to rebuild them" 3757 } 3758 } 3759 return 0; 3760 } 3761 3762 # returns 1 if ports were rebuilt and revupgrade_scanandrebuild should be called again 3763 proc revupgrade_scanandrebuild {broken_port_counts_name} { 3764 upvar $broken_port_counts_name broken_port_counts 3765 3751 3766 set files [registry::file search active 1 binary -null] 3752 3767 if {[llength $files] > 0} { … … 3761 3776 } 3762 3777 } catch {*} { 3763 ui_ msg"Updating database of binaries failed"3778 ui_error "Updating database of binaries failed" 3764 3779 throw 3765 3780 } … … 3786 3801 3787 3802 if {$returncode != $machista::SUCCESS} { 3788 ui_ warn"Error parsing file [$b path]: [machista::strerror $returncode]"3803 ui_info "Error parsing file [$b path]: [machista::strerror $returncode]" 3789 3804 continue; 3790 3805 } … … 3857 3872 } 3858 3873 set broken_ports [lsort -unique $broken_ports] 3874 3875 foreach port $broken_ports { 3876 if {![info exists broken_port_counts([$port name])]} { 3877 set broken_port_counts([$port name]) 0 3878 } 3879 incr broken_port_counts([$port name]) 3880 if {$broken_port_counts([$port name]) > 3} { 3881 ui_error "Port [$port name] is still broken after rebuiling it more than 3 times. You might want to file a bug for this." 3882 error "Port [$port name] still broken after rebuilding $broken_port_counts([$port name]) time(s)" 3883 } 3884 } 3859 3885 3860 3886 ui_msg "---> Found [llength $broken_ports] broken port(s), determining rebuild order" … … 3904 3930 ui_msg " [$port name] @[$port version] [$port variants][$port negated_variants]" 3905 3931 } 3932 3933 return 1; 3906 3934 } 3907 3935
Note: See TracChangeset
for help on using the changeset viewer.

