diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-16 12:16:43 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-16 12:16:43 +0000 |
commit | ea153cc43d871c3ad1608f57c9bcca0f138e2a74 (patch) | |
tree | 47e05bfe749567c26a6022ed54032fc60451834a /usr.sbin/pkg_add/OpenBSD | |
parent | 6014a331b9b73ced0320cf3b8f89dcef12379015 (diff) |
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.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-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); |