From e51cd159fc1533ffc2cd6b58df0299886e91d902 Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <andreas.romeyke@slub-dresden.de>
Date: Mon, 2 Sep 2024 13:33:12 +0200
Subject: [PATCH] - fixed dependency, replaced Archive::BagIt::Fast with
 Archive::BagIt, because IO::AIO has problems under Perl 5.36

---
 gitlab-ci/Dockerfile                      | 1 -
 lib/SLUB/LZA/TA/Command/sample_testing.pm | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gitlab-ci/Dockerfile b/gitlab-ci/Dockerfile
index 32084a5..e0f411e 100644
--- a/gitlab-ci/Dockerfile
+++ b/gitlab-ci/Dockerfile
@@ -64,7 +64,6 @@ RUN mkdir -p "$EXTLIB"
 RUN mkdir -p "$PERL_CPANM_HOME"
 RUN cpanm -L "$EXTLIB" --notest --verbose --no-interactive \
       Archive::BagIt \
-      Archive::BagIt::Fast \
       IO::Prompt::Tiny \
       Pod::Autopod \
       Test::Retry \
diff --git a/lib/SLUB/LZA/TA/Command/sample_testing.pm b/lib/SLUB/LZA/TA/Command/sample_testing.pm
index a216b13..f62ec18 100644
--- a/lib/SLUB/LZA/TA/Command/sample_testing.pm
+++ b/lib/SLUB/LZA/TA/Command/sample_testing.pm
@@ -6,7 +6,7 @@ use SLUB::LZA::TA::Archivematica::Elasticsearch;
 use SLUB::LZA::TA::Archivematica::Elasticsearch::PrepareQuery;
 use SLUB::LZA::TA::Output;
 
-use Archive::BagIt::Fast;
+use Archive::BagIt;
 use Date::Calc qw(Date_to_Time Today Add_Delta_YM Add_Delta_YMD Day_of_Week);
 use List::Util qw(sample);
 use namespace::autoclean -except => qr{SLUB::LZA::TA::.*};
@@ -169,7 +169,7 @@ sub _check_aip ($sample, $opt) {
             $line->{"localPath$tries"} = $remapped;
         }
         if (-d $remapped) {
-            my $bag = Archive::BagIt::Fast->new($remapped);
+            my $bag = Archive::BagIt->new($remapped);
             $bag->use_plugins('Archive::BagIt::Plugin::Algorithm::SHA512');
             $is_valid = $bag->verify_bag({ report_all_errors => 1 });
             if (!$is_valid) {$is_valid = 0;}
-- 
GitLab