Skip to content
Permalink
Browse files

Properly use ui_error.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@226 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jordan K. Hubbard
Jordan K. Hubbard committed Aug 21, 2002
1 parent 2a16f87 commit 70cc1203dacae31002daef89752030470b236ddb
Showing with 5 additions and 5 deletions.
  1. +4 −4 src/port1.0/portchecksum.tcl
  2. +1 −1 src/port1.0/portextract.tcl
@@ -25,7 +25,7 @@ proc md5 {file} {
return $sum
} else {
# XXX Handle this error beter
ui_error "$UI_PREFIX $line - md5sum failed!"
ui_error "$line - md5sum failed!"
return -1
}
}
@@ -50,21 +50,21 @@ proc checksum_main {args} {
}

if ![info exists checksums] {
ui_error "$UI_PREFIX No MD5 checksums."
ui_error "No MD5 checksums."
return -1
}

foreach distfile $all_dist_files {
set checksum [md5 $distpath/$distfile]
set dchecksum [dmd5 $distfile]
if {$dchecksum == -1} {
ui_error "$UI_PREFIX No checksum recorded for $distfile"
ui_error "No checksum recorded for $distfile"
return -1
}
if {$checksum == $dchecksum} {
ui_msg "$UI_PREFIX Checksum OK for $distfile"
} else {
ui_error "$UI_PREFIX Checksum mismatch for $distfile"
ui_error "Checksum mismatch for $distfile"
return -1
}
}
@@ -47,7 +47,7 @@ proc extract_main {args} {
ui_info "$UI_PREFIX Extracting $distfile ... " -nonewline
set cmd "${extract.cmd} [join ${extract.before_args}] $distpath/$distfile [join ${extract.after_args}]"
if [catch {system $cmd} result] {
ui_error "$UI_PREFIX $result"
ui_error "$result"
return -1
}
ui_info "Done"

0 comments on commit 70cc120

Please sign in to comment.
You can’t perform that action at this time.