diff options
author | 2017-09-16 11:36:25 +0000 | |
---|---|---|
committer | 2017-09-16 11:36:25 +0000 | |
commit | c179c39699fb3d26d824aedca6e28bd33d861c77 (patch) | |
tree | 988d25d4474cbff6b9d19b849204c77610502fbd | |
parent | Make sure to freezero() the wide-character copy of the user supplied password. (diff) | |
download | wireguard-openbsd-c179c39699fb3d26d824aedca6e28bd33d861c77.tar.xz wireguard-openbsd-c179c39699fb3d26d824aedca6e28bd33d861c77.zip |
recognize @version, to be used for a system-wide version marker
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 9 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 31e2f551aed..79b49ac6f80 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.246 2017/05/15 15:14:11 schwarze Exp $ +# $OpenBSD: PackingElement.pm,v 1.247 2017/09/16 11:36:25 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -1021,6 +1021,13 @@ sub write_no_sig() { } +package OpenBSD::PackingElement::Version; +our @ISA=qw(OpenBSD::PackingElement::Unique); + +sub keyword() { "version" } +__PACKAGE__->register_with_factory; +sub category() { "version" } + package OpenBSD::PackingElement::Conflict; our @ISA=qw(OpenBSD::PackingElement::Meta); diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 429b4082542..1d6d908aaca 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingList.pm,v 1.142 2016/10/04 14:24:45 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.143 2017/09/16 11:36:25 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -278,7 +278,7 @@ sub UpdateInfoOnly } return; } - if (m/^\@(?:name|depend|wantlib|conflict|option|pkgpath|url|arch|comment\s+(?:subdir|pkgpath)\=)\b/o) { + if (m/^\@(?:name|depend|wantlib|conflict|option|pkgpath|url|version|arch|comment\s+(?:subdir|pkgpath)\=)\b/o) { &$cont($_); # XXX optimization } elsif (m/^\@(?:newgroup|newuser|cwd)\b/o) { @@ -446,7 +446,7 @@ sub match_pkgpath } our @unique_categories = - (qw(name url signer digital-signature no-default-conflict manual-installation firmware always-update is-branch extrainfo localbase arch)); + (qw(name url version signer digital-signature no-default-conflict manual-installation firmware always-update is-branch extrainfo localbase arch)); our @list_categories = (qw(conflict pkgpath ask-update depend |