diff options
author | 2007-06-16 12:16:42 +0000 | |
---|---|---|
committer | 2007-06-16 12:16:42 +0000 | |
commit | 83185a3e91b9db9131ef640cadc9273d196a3813 (patch) | |
tree | 3aeb0e9e3821516e5a3e3425e778b3e90b650ef7 | |
parent | don't mix u_int{8,16,32}_t and uint{8,16,32}_t (diff) | |
download | wireguard-openbsd-83185a3e91b9db9131ef640cadc9273d196a3813.tar.xz wireguard-openbsd-83185a3e91b9db9131ef640cadc9273d196a3813.zip |
introduce new stuff: @tag, to be used to tag files and other objects.
Only one tag for now: no checksum.
Will supersede @comment no checksum eventually.
Benefit: errors out in case of a typo.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 717ea1f6e5c..1fdebd0c067 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.137 2007/06/16 11:50:49 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.138 2007/06/16 12:16:42 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -568,6 +568,22 @@ sub add return; } +package OpenBSD::PackingElement::tag; +our @ISA=qw(OpenBSD::PackingElement::Annotation); + +__PACKAGE__->register_with_factory('tag'); + +sub add +{ + my ($class, $plist, $args) = @_; + + if ($args eq 'no checksum') { + $plist->{state}->{lastfile}->{nochecksum} = 1; + } else { + die "Unknown tag $args"; + } +} + package OpenBSD::PackingElement::symlink; our @ISA=qw(OpenBSD::PackingElement::Annotation); |