summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2018-10-22 10:29:06 +0000
committerespie <espie@openbsd.org>2018-10-22 10:29:06 +0000
commit9ab6974ea77127bab3a2f72b9a62ef5268e65d56 (patch)
tree38f5222492b4d84f355fee4f837efba6b647548e
parentProperly throttle dumping of prefixes to peers. Eventhough we got the XON/XOFF (diff)
downloadwireguard-openbsd-9ab6974ea77127bab3a2f72b9a62ef5268e65d56.tar.xz
wireguard-openbsd-9ab6974ea77127bab3a2f72b9a62ef5268e65d56.zip
start erroring out based on unfilled tracker entries
(to be specified more later... right now it doesn't even warn if you have packages installed that are MORE recent than the mirror)
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgAdd.pm11
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Tracker.pm8
2 files changed, 17 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
index 2eb84359fd9..da3d719c324 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgAdd.pm,v 1.104 2018/07/10 10:37:59 espie Exp $
+# $OpenBSD: PkgAdd.pm,v 1.105 2018/10/22 10:29:06 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -1039,11 +1039,20 @@ sub inform_user_of_problems
$state->say("Couldn't find updates for #1",
join(' ', sort @cantupdate)) if @cantupdate > 0;
+ if (@cantupdate > 0) {
+ $state->{bad}++;
+ }
}
if (defined $state->{issues}) {
$state->say("There were some ambiguities. ".
"Please run in interactive mode again.");
}
+ my @install = $state->tracker->cant_install_list;
+ if (@install > 0) {
+ $state->say("Couldn't install #1",
+ join(' ', sort @install));
+ $state->{bad}++;
+ }
}
# if we already have quirks, we update it. If not, we try to install it.
diff --git a/usr.sbin/pkg_add/OpenBSD/Tracker.pm b/usr.sbin/pkg_add/OpenBSD/Tracker.pm
index 1b019879819..0b043bccdda 100644
--- a/usr.sbin/pkg_add/OpenBSD/Tracker.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Tracker.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Tracker.pm,v 1.28 2015/08/13 16:34:11 espie Exp $
+# $OpenBSD: Tracker.pm,v 1.29 2018/10/22 10:29:06 espie Exp $
#
# Copyright (c) 2009 Marc Espie <espie@openbsd.org>
#
@@ -214,4 +214,10 @@ sub cant_list
return keys %{$self->{cant_update}};
}
+sub cant_install_list
+{
+ my $self = shift;
+ return keys %{$self->{cant_install}};
+}
+
1;