summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-12-30 09:39:09 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-12-30 09:39:09 +0000
commitb97a063e7a0484e8a91e818da3ffc76a7bbddac9 (patch)
tree1d8c2479d88f275f735fcd6f8a8c358aa48b48c0 /usr.sbin
parent0c77d72cf994937079ad54e3d591cb4d4ec51666 (diff)
infrastructure for url elements
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm14
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingList.pm8
2 files changed, 17 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index d2bd11d5edb..2b6e32923c3 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.166 2009/12/30 09:37:55 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.167 2009/12/30 09:39:08 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -871,6 +871,18 @@ sub keyword() { "localbase" }
__PACKAGE__->register_with_factory;
sub category() { "localbase" }
+package OpenBSD::PackingElement::Url;
+our @ISA=qw(OpenBSD::PackingElement::Unique);
+
+sub keyword() { "url" }
+__PACKAGE__->register_with_factory;
+sub category() { "url" }
+
+# XXX don't incorporate this in signatures.
+sub write_no_sig()
+{
+}
+
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 f19edfe19c3..004e7657640 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.95 2009/12/26 16:58:11 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.96 2009/12/30 09:39:08 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -236,7 +236,7 @@ sub UpdateInfoOnly
# XXX optimization
if (m/^\@arch\b/o) {
while (<$fh>) {
- if (m/^\@(?:depend|wantlib|conflict|option|pkgpath)\b/o) {
+ if (m/^\@(?:depend|wantlib|conflict|option|pkgpath|url)\b/o) {
&$cont($_);
} elsif (m/^\@(?:groups|users|cwd)\b/o) {
last;
@@ -252,7 +252,7 @@ sub UpdateInfoOnly
}
return;
}
- next unless m/^\@(?:name\b|depend\b|wantlib\b|conflict|\b|option\b|pkgpath\b|comment\s+subdir\=|arch\b)/o;
+ next unless m/^\@(?:name\b|depend\b|wantlib\b|conflict|\b|option\b|pkgpath\b|comment\s+subdir\=|arch\b|url\b)/o;
&$cont($_);
}
}
@@ -438,7 +438,7 @@ sub match_pkgpath
}
our @unique_categories =
- (qw(name digital-signature no-default-conflict manual-installation always-update extrainfo localbase arch));
+ (qw(name url digital-signature no-default-conflict manual-installation always-update extrainfo localbase arch));
our @list_categories =
(qw(conflict pkgpath incompatibility updateset depend