placeholder for new keyword that doesn't do anything yet, so that when it
authorespie <espie@openbsd.org>
Mon, 1 Jan 2018 14:02:37 +0000 (14:02 +0000)
committerespie <espie@openbsd.org>
Mon, 1 Jan 2018 14:02:37 +0000 (14:02 +0000)
gets used, tools already know about it a bit.
(meant to simplify wantlib updates down the line)

usr.sbin/pkg_add/OpenBSD/PackingElement.pm
usr.sbin/pkg_add/OpenBSD/PackingList.pm

index 79b49ac..3d632e8 100644 (file)
@@ -1,5 +1,5 @@
 # ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.247 2017/09/16 11:36:25 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.248 2018/01/01 14:02:37 espie Exp $
 #
 # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
 #
@@ -1089,6 +1089,14 @@ OpenBSD::Auto::cache(spec,
        require OpenBSD::LibSpec;
        return OpenBSD::LibSpec->from_string($self->name);
     });
+
+package OpeNBSD::PackingElement::Libset;
+our @ISA=qw(OpenBSD::PackingElement::Depend);
+
+sub category() { "libset" }
+sub keyword() { "libset" }
+__PACKAGE__->register_with_factory;
+
 package OpenBSD::PackingElement::PkgPath;
 our @ISA=qw(OpenBSD::PackingElement::Meta);
 
index 1d6d908..5a6d342 100644 (file)
@@ -1,5 +1,5 @@
 # ex:ts=8 sw=4:
-# $OpenBSD: PackingList.pm,v 1.143 2017/09/16 11:36:25 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.144 2018/01/01 14:02:37 espie Exp $
 #
 # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
 #
@@ -235,7 +235,7 @@ sub PrelinkStuffOnly
 {
        my ($fh, $cont) = @_;
        while (<$fh>) {
-               next unless m/^\@(?:cwd|bin|lib|name|depend|wantlib|comment\s+ubdir\=)\b/o;
+               next unless m/^\@(?:cwd|bin|lib|name|libset|depend|wantlib|comment\s+ubdir\=)\b/o;
                &$cont($_);
        }
 }
@@ -244,7 +244,7 @@ sub DependOnly
 {
        my ($fh, $cont) = @_;
        while (<$fh>) {
-               if (m/^\@(?:depend|wantlib|define-tag)\b/o) {
+               if (m/^\@(?:libset|depend|wantlib|define-tag)\b/o) {
                        &$cont($_);
                # XXX optimization
                } elsif (m/^\@(?:newgroup|newuser|cwd)\b/o) {
@@ -260,7 +260,7 @@ sub ExtraInfoOnly
                if (m/^\@(?:name|pkgpath|comment\s+(?:subdir|pkgpath)\=|option)\b/o) {
                        &$cont($_);
                # XXX optimization
-               } elsif (m/^\@(?:depend|wantlib|newgroup|newuser|cwd)\b/o) {
+               } elsif (m/^\@(?:libset|depend|wantlib|newgroup|newuser|cwd)\b/o) {
                        last;
                }
        }
@@ -278,7 +278,7 @@ sub UpdateInfoOnly
                    }
                    return;
                }
-               if (m/^\@(?:name|depend|wantlib|conflict|option|pkgpath|url|version|arch|comment\s+(?:subdir|pkgpath)\=)\b/o) {
+               if (m/^\@(?:name|libset|depend|wantlib|conflict|option|pkgpath|url|version|arch|comment\s+(?:subdir|pkgpath)\=)\b/o) {
                        &$cont($_);
                # XXX optimization
                } elsif (m/^\@(?:newgroup|newuser|cwd)\b/o) {
@@ -294,7 +294,7 @@ sub ConflictOnly
                if (m/^\@(?:name|conflict|option)\b/o) {
                        &$cont($_);
                # XXX optimization
-               } elsif (m/^\@(?:depend|wantlib|newgroup|newuser|cwd)\b/o) {
+               } elsif (m/^\@(?:libset|depend|wantlib|newgroup|newuser|cwd)\b/o) {
                        last;
                }
        }
@@ -449,11 +449,11 @@ our @unique_categories =
     (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
+    (qw(conflict pkgpath ask-update libset depend
        wantlib define-tag groups users items));
 
 our @cache_categories =
-    (qw(depend wantlib));
+    (qw(libset depend wantlib));
 
 sub visit
 {