summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm8
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Vstat.pm9
2 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index 431736cbb8f..21597ccffaf 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.49 2006/12/05 14:04:19 steven Exp $
+# $OpenBSD: Add.pm,v 1.50 2007/02/24 18:45:11 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -71,6 +71,9 @@ sub validate_plist($$)
OpenBSD::CollisionReport::collision_report($colliding, $state);
}
+ if (defined $state->{overflow}) {
+ OpenBSD::Vstat::tally();
+ }
Fatal "fatal issues in installing $pkgname" if $problems;
$totsize = 1 if $totsize == 0;
return $totsize;
@@ -319,6 +322,7 @@ sub validate
Warn "Error: ... more files do not fit on ",
$s->{dev}, "\n";
}
+ $state->{overflow} = 1;
$$problems++;
}
}
@@ -451,6 +455,7 @@ sub validate
Warn "Error: ... more files do not fit on ",
$s->{dev}, "\n";
}
+ $state->{overflow} = 1;
$$problems++;
}
}
@@ -623,6 +628,7 @@ sub validate
}
if ($s->avail() < 0) {
Warn "Error: ", $s->{dev}, " is not large enough ($fname)\n";
+ $state->{overflow} = 1;
$$problems++;
}
}
diff --git a/usr.sbin/pkg_add/OpenBSD/Vstat.pm b/usr.sbin/pkg_add/OpenBSD/Vstat.pm
index fe4bd7337a4..d88e198748f 100644
--- a/usr.sbin/pkg_add/OpenBSD/Vstat.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Vstat.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Vstat.pm,v 1.14 2006/02/07 10:56:55 espie Exp $
+# $OpenBSD: Vstat.pm,v 1.15 2007/02/24 18:45:11 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -165,7 +165,12 @@ sub tally()
{
while (my ($device, $data) = each %$devinfo) {
if ($data->{used} != 0) {
- print $device, ": ", $data->{used}, " bytes\n";
+ print $device, ": ", $data->{used}, " bytes";
+ my $avail = $data->avail();
+ if ($avail < 0) {
+ print " (missing ", int(-$avail+1), " blocks)";
+ }
+ print "\n";
}
}
}