Skip to content

Commit f99ca41

Browse files
committed
Do not insist on Digest::SHA in Apk.pm
1 parent fba71af commit f99ca41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Build/Apk.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ package Build::Apk;
2323
use strict;
2424

2525
use Digest::MD5;
26-
use Digest::SHA;
2726

2827
eval { require Archive::Tar };
2928
*Archive::Tar::new = sub {die("Archive::Tar is not available\n")} unless defined &Archive::Tar::new;
@@ -614,6 +613,7 @@ sub calcapkchksum {
614613
$section = $section eq 'sig' ? 0 : $section eq 'ctrl' ? 1 : 2;
615614
my $fd;
616615
open($fd, '<', $handle) or die("$handle: $!\n");
616+
require Digest::SHA;
617617
my $ctx;
618618
$ctx = Digest::SHA->new(1) if $type eq 'Q1' || $type eq 'X1' || $type eq 'sha1';
619619
$ctx = Digest::SHA->new(256) if $type eq 'Q2' || $type eq 'X2' || $type eq 'sha256';

0 commit comments

Comments
 (0)