summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Replace.pm4
-rw-r--r--usr.sbin/pkg_add/pkg_create4
3 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 8a6c007d6b7..e9b7ec20c8e 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.150 2008/10/20 10:25:16 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.151 2008/10/24 16:50:27 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -254,6 +254,7 @@ sub compute_digest
{
my ($self, $filename, $class) = @_;
require OpenBSD::md5;
+ $class = 'OpenBSD::sha' if !defined $class;
return $class->new($filename);
}
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm
index ee7cba234c9..a3270f913c1 100644
--- a/usr.sbin/pkg_add/OpenBSD/Replace.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Replace.pm,v 1.46 2008/10/07 06:29:36 espie Exp $
+# $OpenBSD: Replace.pm,v 1.47 2008/10/24 16:50:27 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -452,7 +452,7 @@ sub save_old_libraries
close $descr;
my $f = OpenBSD::PackingElement::FDESC->add($stub_list, DESC);
$f->{ignore} = 1;
- $f->add_digest($f->compute_digest($dest.DESC, 'OpenBSD::md5'));
+ $f->add_digest($f->compute_digest($dest.DESC));
$stub_list->to_installation;
$o->{plist}->to_installation;
}
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create
index 0343fb4dc90..ceec40fe428 100644
--- a/usr.sbin/pkg_add/pkg_create
+++ b/usr.sbin/pkg_add/pkg_create
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_create,v 1.118 2008/10/06 09:36:17 espie Exp $
+# $OpenBSD: pkg_create,v 1.119 2008/10/24 16:50:27 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -93,7 +93,7 @@ sub compute_checksum
$result->make_hardlink($stash->{"$dev/$ino"});
} else {
$stash->{"$dev/$ino"} = $name;
- $result->add_digest($self->compute_digest($fname, 'OpenBSD::md5'));
+ $result->add_digest($self->compute_digest($fname));
$result->add_size($size);
}
} else {