Skip to content

Commit

Permalink
base: warning if reinplace doesn't change anything
Browse files Browse the repository at this point in the history
see: https://trac.macports.org/ticket/15514
(cherry picked from commit 8460505)
  • Loading branch information
kurthindenburg committed Feb 16, 2017
1 parent db072da commit 7b288f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/port1.0/portutil.tcl
Expand Up @@ -908,8 +908,6 @@ proc reinplace {args} {
global env workpath worksrcpath
set extended 0
set suppress 0
# once a macports version has been released, add the rest of the
# code from https://trac.macports.org/ticket/15514
set quiet 0
set oldlocale_exists 0
set oldlocale ""
Expand Down Expand Up @@ -1024,6 +1022,12 @@ proc reinplace {args} {
}
close $tmpfd

if {!$quiet} {
if {![catch {exec cmp -s $file $tmpfile}]} {
ui_warn "[format [msgcat::mc "reinplace %1\$s didn't change anything in %2\$s"] $pattern $file]"
}
}

set attributes [file attributes $file]
chownAsRoot $file

Expand Down

0 comments on commit 7b288f5

Please sign in to comment.