Ticket #15514: reinplace-warning8.diff

File reinplace-warning8.diff, 1.3 KB (added by kurthindenburg (Kurt Hindenburg), 10 years ago)

updated for current base

  • port1.0/portutil.tcl

     
    919919    global env workpath worksrcpath macosx_version
    920920    set extended 0
    921921    set suppress 0
     922    set quiet 0
    922923    set oldlocale_exists 0
    923924    set oldlocale ""
    924925    set locale ""
     
    942943                n {
    943944                    set suppress 1
    944945                }
     946                q {
     947                    set quiet 1
     948                }
    945949                W {
    946950                    set dir [lindex $args 0]
    947951                    set args [lrange $args 1 end]
     
    958962        }
    959963    }
    960964    if {[llength $args] < 2} {
    961         error "reinplace ?-E? ?-n? ?-W dir? pattern file ..."
     965        error "reinplace ?-E? ?-n? ?-q? ?-W dir? pattern file ..."
    962966    }
    963967    set pattern [lindex $args 0]
    964968    set files [lrange $args 1 end]
     
    10371041        }
    10381042        close $tmpfd
    10391043
     1044        if {!$quiet} {
     1045            if {![catch {exec cmp -s $file $tmpfile}]} {
     1046                ui_warn "[format [msgcat::mc "reinplace %1\$s didn't change anything in %2\$s"] $pattern $file]"
     1047            }
     1048        }
     1049
    10401050        set attributes [file attributes $file]
    10411051        # start gsoc08-privileges
    10421052        chownAsRoot $file