summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2014-02-04 18:06:01 +0000
committerespie <espie@openbsd.org>2014-02-04 18:06:01 +0000
commit2a5be836355a13c44b221a45d1496ede9f9420e5 (patch)
tree64f7d81bbffa5cec9191714d5f379534b6879776
parenttweak previous; (diff)
downloadwireguard-openbsd-2a5be836355a13c44b221a45d1496ede9f9420e5.tar.xz
wireguard-openbsd-2a5be836355a13c44b221a45d1496ede9f9420e5.zip
prevent updates from starting with a lone ":"
Some UpdateSets will only contain kept packages, BUT require the update of some dependencies. just spew out the kept_names instead of newer_names in that case.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index d8f1c6ebe5c..fbd058c202a 100644
--- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
+++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: UpdateSet.pm,v 1.74 2014/02/02 15:22:36 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.75 2014/02/04 18:06:01 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -370,7 +370,12 @@ sub print
sub todo_names
{
- &newer_names;
+ my $self = shift;
+ if ($self->newer > 0) {
+ return $self->newer_names;
+ } else {
+ return $self->kept_names;
+ }
}
sub validate_plists