From: espie Date: Sat, 25 Jun 2016 18:02:59 +0000 (+0000) Subject: recognize @option is-branch X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=692ef7093ab79e9fce8210deb0e6015a8f43fef0;p=openbsd recognize @option is-branch so that it trickles to snapshots and then can be used in ports --- diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index eaef5f9a4ee..94e64afd208 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.243 2016/02/03 18:30:15 robert Exp $ +# $OpenBSD: PackingElement.pm,v 1.244 2016/06/25 18:02:59 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -894,6 +894,8 @@ sub new return OpenBSD::PackingElement::Firmware->new; } elsif ($args eq 'always-update') { return OpenBSD::PackingElement::AlwaysUpdate->new; + } elsif ($args eq 'is-branch') { + return OpenBSD::PackingElement::IsBranch->new; } else { die "Unknown option: $args"; } @@ -941,6 +943,13 @@ sub category() 'always-update'; } +package OpenBSD::PackingElement::IsBranch; +our @ISA=qw(OpenBSD::PackingElement::UniqueOption); + +sub category() +{ + 'is-branch'; +} # The special elements that don't end in the right place package OpenBSD::PackingElement::ExtraInfo; our @ISA=qw(OpenBSD::PackingElement::Unique OpenBSD::PackingElement::Comment); diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index f8ec0d2e720..c0100f680c8 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.136 2016/06/14 15:41:31 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.137 2016/06/25 18:02:59 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -257,7 +257,7 @@ sub ExtraInfoOnly { my ($fh, $cont) = @_; while (<$fh>) { - if (m/^\@(?:name|pkgpath|comment\s+(?:subdir|pkgpath)\=)\b/o) { + if (m/^\@(?:name|pkgpath|comment\s+(?:subdir|pkgpath)\=|option\s+is-branch)\b/o) { &$cont($_); # XXX optimization } elsif (m/^\@(?:depend|wantlib|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 extrainfo localbase arch)); + (qw(name url 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