diff options
author | 2005-08-05 09:52:08 +0000 | |
---|---|---|
committer | 2005-08-05 09:52:08 +0000 | |
commit | 806ee6081c0d4f2960c96bfb1bbec0b63bad97bb (patch) | |
tree | 8fe4ece178f3ce0335bdda6344cb5ed6a6a4f7a0 | |
parent | Make those tests match the actual implementation, not a not yet commited future (diff) | |
download | wireguard-openbsd-806ee6081c0d4f2960c96bfb1bbec0b63bad97bb.tar.xz wireguard-openbsd-806ee6081c0d4f2960c96bfb1bbec0b63bad97bb.zip |
Make sure $totsize != 0, even if the package does not contain any actual
files, so that the progress meter will work.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Delete.pm | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 7a8839f539f..5b86a5efb91 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.33 2005/06/21 19:12:31 espie Exp $ +# $OpenBSD: Add.pm,v 1.34 2005/08/05 09:52:08 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -125,6 +125,7 @@ sub validate_plist($$) OpenBSD::CollisionReport::collision_report($colliding, $state); } Fatal "fatal issues in installing $pkgname" if $problems; + $totsize = 1 if $totsize == 0; return $totsize; } diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm index efc995f8fe8..50144544173 100644 --- a/usr.sbin/pkg_add/OpenBSD/Delete.pm +++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Delete.pm,v 1.22 2005/07/24 10:41:14 espie Exp $ +# $OpenBSD: Delete.pm,v 1.23 2005/08/05 09:52:08 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -114,6 +114,7 @@ sub validate_plist($$) } } Fatal "fatal issues" if $problems; + $totsize = 1 if $totsize == 0; $plist->{totsize} = $totsize; } |