diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index dec07fc226e..a707dd14534 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.146 2008/06/06 14:49:21 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.147 2008/06/11 09:42:13 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -250,6 +250,13 @@ sub realname return $state->{destdir}.$name; } +sub compute_md5 +{ + my ($self, $filename) = @_; + require OpenBSD::md5; + return OpenBSD::md5::fromfile($filename); +} + # exec/unexec and friends package OpenBSD::PackingElement::Action; our @ISA=qw(OpenBSD::PackingElement::Object); @@ -1312,23 +1319,26 @@ sub exec_on_delete { 0 } sub add_md5 { - my ($self, $md5) = @_; - $self->{md5} = $md5; + &OpenBSD::PackingElement::FileBase::add_md5; } sub add_size { - my ($self, $sz) = @_; - $self->{size} = $sz; + &OpenBSD::PackingElement::FileBase::add_size; } -sub needs_keyword { 0 } +sub compute_md5 +{ + &OpenBSD::PackingElement::FileObject::compute_md5; +} sub write { &OpenBSD::PackingElement::FileBase::write; } +sub needs_keyword { 0 } + sub add_object { my ($self, $plist) = @_; |