From f99ca41ba514dcfb919b75085ee167e578587044 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 20 Jan 2025 14:06:53 +0100 Subject: [PATCH] Do not insist on Digest::SHA in Apk.pm --- Build/Apk.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Apk.pm b/Build/Apk.pm index c40ab5e3..958ef024 100644 --- a/Build/Apk.pm +++ b/Build/Apk.pm @@ -23,7 +23,6 @@ package Build::Apk; use strict; use Digest::MD5; -use Digest::SHA; eval { require Archive::Tar }; *Archive::Tar::new = sub {die("Archive::Tar is not available\n")} unless defined &Archive::Tar::new; @@ -614,6 +613,7 @@ sub calcapkchksum { $section = $section eq 'sig' ? 0 : $section eq 'ctrl' ? 1 : 2; my $fd; open($fd, '<', $handle) or die("$handle: $!\n"); + require Digest::SHA; my $ctx; $ctx = Digest::SHA->new(1) if $type eq 'Q1' || $type eq 'X1' || $type eq 'sha1'; $ctx = Digest::SHA->new(256) if $type eq 'Q2' || $type eq 'X2' || $type eq 'sha256';