Changeset 221 for trunk/base
- Timestamp:
- Aug 21, 2002, 7:18:41 AM (22 years ago)
- Location:
- trunk/base/src/port1.0
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portbuild.tcl
r218 r221 15 15 options make.cmd make.type make.target.all make.target.install 16 16 17 set UI_PREFIX "---> " 18 17 19 proc build_main {args} { 18 global portname portpath workdir worksrcdir prefix make.type make.cmd make.worksrcdir make.target.all 20 global portname portpath workdir worksrcdir prefix make.type make.cmd make.worksrcdir make.target.all UI_PREFIX 19 21 20 22 default make.type bsd … … 32 34 } 33 35 default make.target.all all 36 ui_msg "$UI_PREFIX Building $portname with target ${make.target.all}" 34 37 system "${make.cmd} ${make.target.all}" 35 38 return 0 -
trunk/base/src/port1.0/portchecksum.tcl
r214 r221 14 14 options checksums 15 15 16 set UI_PREFIX "---> " 17 16 18 proc md5 {file} { 17 global distpath 19 global distpath UI_PREFIX 18 20 19 21 set md5regex "^(MD5)\[ \]\\(($file)\\)\[ \]=\[ \](\[A-Za-z0-9\]+)\n$" … … 24 26 } else { 25 27 # XXX Handle this error beter 26 ui_puts $line 27 ui_puts "md5sum failed!" 28 ui_error "$UI_PREFIX $line - md5sum failed!" 28 29 return -1 29 30 } … … 42 43 43 44 proc checksum_main {args} { 44 global checksums distpath portpath all_dist_files 45 global checksums distpath portpath all_dist_files UI_PREFIX 45 46 46 47 # If no files have been downloaded there is nothing to checksum … … 50 51 51 52 if ![info exists checksums] { 52 ui_ puts "No MD5 checksums."53 ui_error "$UI_PREFIX No MD5 checksums." 53 54 return -1 54 55 } … … 58 59 set dchecksum [dmd5 $distfile] 59 60 if {$dchecksum == -1} { 60 ui_ puts "No checksum recorded for $distfile"61 ui_error "$UI_PREFIX No checksum recorded for $distfile" 61 62 return -1 62 63 } 63 64 if {$checksum == $dchecksum} { 64 ui_ puts "Checksum OK for $distfile"65 ui_msg "$UI_PREFIX Checksum OK for $distfile" 65 66 } else { 66 ui_ puts "Checksum mismatch for $distfile"67 ui_error "$UI_PREFIX Checksum mismatch for $distfile" 67 68 return -1 68 69 } -
trunk/base/src/port1.0/portconfigure.tcl
r218 r221 15 15 options configure.type configure.args configure.worksrcdir automake automake.env automake.args autoconf autoconf.env autoconf.args xmkmf libtool 16 16 17 set UI_PREFIX "---> " 18 17 19 proc configure_main {args} { 18 global configure configure.type configure.args configure.worksrcdir automake automake.env automake.args autoconf autoconf.env autoconf.args xmkmf libtool portname portpath workdir worksrcdir prefix 20 global configure configure.type configure.args configure.worksrcdir automake automake.env automake.args autoconf autoconf.env autoconf.args xmkmf libtool portname portpath workdir worksrcdir prefix UI_PREFIX 19 21 20 22 if [info exists configure.worksrcdir] { … … 29 31 } 30 32 33 ui_msg "$UI_PREFIX Running configure script" 31 34 if [info exists configure.args] { 32 35 system "./configure --prefix=${prefix} ${configure.args}" -
trunk/base/src/port1.0/portextract.tcl
r218 r221 17 17 options extract_opts extract.only extract.cmd extract.before_args extract.after_args 18 18 19 set UI_PREFIX "---> " 20 19 21 proc extract_main {args} { 20 global portname portpath portpath workdir distname distpath distfiles use_bzip2 extract.only extract.cmd extract.before_args extract.after_args 22 global portname portpath portpath workdir distname distpath distfiles use_bzip2 extract.only extract.cmd extract.before_args extract.after_args UI_PREFIX 21 23 22 24 if {![info exists distfiles] && ![info exists extract.only]} { … … 39 41 } 40 42 41 ui_ puts "Extracting for $distname"43 ui_msg "$UI_PREFIX Extracting for $distname" 42 44 43 45 cd $portpath/$workdir 44 46 foreach distfile ${extract.only} { 45 ui_puts "$distfile: " -nonewline 46 flush stdout 47 ui_info "$UI_PREFIX Extracting $distfile ... " -nonewline 47 48 set cmd "${extract.cmd} [join ${extract.before_args}] $distpath/$distfile [join ${extract.after_args}]" 48 49 if [catch {system $cmd} result] { 49 ui_ puts $result50 ui_error "$UI_PREFIX $result" 50 51 return -1 51 52 } 52 ui_ puts "done"53 ui_info "Done" 53 54 } 54 55 return 0 -
trunk/base/src/port1.0/portfetch.tcl
r220 r221 17 17 # Defaults 18 18 default extract_sufx tar.gz 19 20 set UI_PREFIX "---> " 19 21 20 22 proc suffix {distname} { … … 47 49 48 50 proc fetchfiles {args} { 49 global distpath all_dist_files master_sites 51 global distpath all_dist_files master_sites UI_PREFIX 50 52 51 53 if {![file isdirectory $distpath]} { … … 55 57 foreach distfile $all_dist_files { 56 58 if {![file isfile $distpath/$distfile]} { 57 ui_ puts "$distfile doesn't seem to exist in $distpath"59 ui_info "$UI_PREFIX $distfile doesn't seem to exist in $distpath" 58 60 foreach site $master_sites { 59 ui_ puts "Attempting to fetchfrom $site"61 ui_msg "$UI_PREFIX Attempting to fetch $distfile from $site" 60 62 if ![catch {exec curl -o ${distpath}/${distfile} ${site}${distfile} >&@ stdout} result] { 61 63 set fetched 1 -
trunk/base/src/port1.0/portpatch.tcl
r218 r221 12 12 register com.apple.patch swdep build depends_build 13 13 14 set UI_PREFIX "---> " 15 14 16 proc patch_main {args} { 15 global portname patchfiles distpath filedir workdir portpath 17 global portname patchfiles distpath filedir workdir portpath UI_PREFIX 16 18 17 19 if ![info exists patchfiles] { … … 30 32 cd $portpath/$workdir 31 33 foreach patch $patchlist { 34 ui_info "$UI_PREFIX Applying $patch" 32 35 switch -glob -- [file tail $patch] { 33 36 *.Z - -
trunk/base/src/port1.0/portui.tcl
r214 r221 15 15 # If set, output informational messages (ui_info) 16 16 options ports_verbose 17 18 # If set, don't output "standard messages" 19 options ports_quiet 17 20 18 21 # do whatever interesting things need to be done to initialize the UI … … 70 73 71 74 # Output message if ports_verbose is set. 72 # Output debugging messages if the ports_debug variable is set. 73 proc ui_info {str} { 75 proc ui_info {str {nonl ""}} { 74 76 global ports_verbose 75 77 76 78 if [tbool ports_verbose] { 77 ui_puts $str 79 ui_puts $str $nonl 78 80 } 81 } 82 83 # Output message unless ports_quiet is set. 84 proc ui_msg {str {nonl ""}} { 85 global ports_quiet 86 87 if ![tbool ports_quiet] { 88 ui_puts $str $nonl 89 } 90 } 91 92 # Output message unconditionally as an error message. 93 proc ui_error {str} { 94 ui_puts Error: $str 79 95 } 80 96 -
trunk/base/src/port1.0/portutil.tcl
r217 r221 140 140 set procedure [lindex $args 1] 141 141 if {[dlist_has_key targets $name procedure,$chain]} { 142 ui_ puts"Warning: target '$name' re-registered for chain $chain (new procedure: '$procedure')"142 ui_info "Warning: target '$name' re-registered for chain $chain (new procedure: '$procedure')" 143 143 } 144 144 dlist_set_key targets $name procedure,$chain $procedure … … 161 161 dlist_append_key targets $name $mode $args 162 162 } else { 163 ui_ puts"Warning: target '$name' not-registered in register $mode"163 ui_info "Warning: target '$name' not-registered in register $mode" 164 164 } 165 165 … … 407 407 if { [llength $names] > 0} { 408 408 # somebody broke! 409 ui_ puts"Warning: the following items did not execute: "409 ui_info "Warning: the following items did not execute: " 410 410 foreach name $names { 411 ui_ puts"$uplist($name) " -nonewline412 } 413 ui_ puts""411 ui_info "$uplist($name) " -nonewline 412 } 413 ui_info "" 414 414 } 415 415 } … … 429 429 } 430 430 } else { 431 ui_ puts"$chain error: $name returned $result"431 ui_error "$chain error: $name returned $result" 432 432 set result failure 433 433 } 434 434 } else { 435 ui_ puts"Warning: $name does not support chain $chain"435 ui_info "Warning: $name does not support chain $chain" 436 436 set result failure 437 437 } … … 452 452 # Special-case 'all' 453 453 } elseif {![string equal $target all]} { 454 ui_ puts"Warning: unknown target: $target"454 ui_info "Warning: unknown target: $target" 455 455 return 456 456 }
Note: See TracChangeset
for help on using the changeset viewer.