diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-12-18 13:58:44 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-12-18 13:58:44 +0000 |
commit | c29ac2b6556211770e7d01711e34ee472602fed6 (patch) | |
tree | 1a063adb8f748b97e4a9b80a04287ac39e8bd534 | |
parent | 70ce78a5f1e6252885bad05fb42a31f500ab77ce (diff) |
display something when files ought to get moved in -n.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 297568857ed..81218543211 100644 --- a/usr.sbin/pkg_add/OpenBSD/Add.pm +++ b/usr.sbin/pkg_add/OpenBSD/Add.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Add.pm,v 1.27 2004/12/18 13:48:23 espie Exp $ +# $OpenBSD: Add.pm,v 1.28 2004/12/18 13:58:43 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -288,7 +288,10 @@ sub install my $destdir = $state->{destdir}; if ($state->{replacing}) { - return if $state->{not}; + if ($state->{not}) { + print "moving tempfile -> $destdir$fullname\n"; + return; + } File::Path::mkpath(dirname($destdir.$fullname)); if (defined $self->{link}) { link($destdir.$self->{link}, $destdir.$fullname); @@ -297,7 +300,7 @@ sub install } else { rename($self->{tempname}, $destdir.$fullname) or Fatal "Can't move ", $self->{tempname}, " to $fullname: $!"; - print "moving ", $self->{tempname}, " -> $destdir$fullname\n" if $state->{beverbose}; + print "moving ", $self->{tempname}, " -> $destdir$fullname\n" if $state->{very_verbose}; undef $self->{tempname}; } } else { |