diff --git a/textarchive/lib/md5cat.pm b/textarchive/lib/md5cat.pm index 8cd12625c023c99e8d994851b23a18fcf62a93bc..0b2e684f2537c7f69686b1910c4b31e9f729841a 100644 --- a/textarchive/lib/md5cat.pm +++ b/textarchive/lib/md5cat.pm @@ -1,5 +1,5 @@ # -# $Id: md5cat.pm,v 1.9 2016/08/02 08:24:55 gonter Exp $ +# $Id: md5cat.pm,v 1.11 2017/01/03 06:21:43 gonter Exp $ # =head1 NAME @@ -353,8 +353,8 @@ sub check_new_files close (FO); } - push (@main::REPORT, sprintf ("checked %s: %8d (%s)", $md5cat->{'chksum_pgm'}, scalar (@tmp_2chk))); - push (@main::REPORT, sprintf ("checked openssl: %8d (%s)", $QUEUE_openssl)); + push (@main::REPORT, sprintf ("checked %s: %10d (%s)", $md5cat->{'chksum_pgm'}, scalar (@tmp_2chk))); + push (@main::REPORT, sprintf ("checked openssl: %10d (%s)", $QUEUE_openssl)); (wantarray) ? @res : \@res; } @@ -523,8 +523,8 @@ this may be obsolete and shold be removed } close (FI); - push (@main::REPORT, sprintf ("retained: %8d (%s)", $cnt_retained, $list)); - push (@main::REPORT, sprintf ("dropped: %8d (%s)", $cnt_dropped, $list)); + push (@main::REPORT, sprintf ("retained: %10d (%s)", $cnt_retained, $list)); + push (@main::REPORT, sprintf ("dropped: %10d (%s)", $cnt_dropped, $list)); return $rc; } @@ -564,7 +564,7 @@ sub digest_md5_list } my $md5= Digest::MD5::File::file_md5_hex ($f); -printf ("%9d %s %s\n", $st[7], $md5, $f); +printf ("%10d %s %s\n", $st[7], $md5, $f); push (@res, [ $md5, $f, $st[7], $st[9] ]); $cnt++; diff --git a/textarchive/vlib001.pl b/textarchive/vlib001.pl index f85e66426700c9713a94428b820b3d3472f86cdf..e4c0b44546e2dc7646ebc20b353edf7c5ef225ab 100755 --- a/textarchive/vlib001.pl +++ b/textarchive/vlib001.pl @@ -60,6 +60,7 @@ use TA::ObjReg; # use TA::Hasher; # use TA::Util; use md5cat; +use Util::ts qw(ts_ISO); my @PAR= (); my $project; @@ -401,16 +402,21 @@ sub refresh_internal # ZZZ # update the Object registry with new items - printf ("%9d new items to be processed\n", scalar @$new_files); + my $cnt_total= scalar @$new_files; + my $cnt_done= 0; + printf ("%9d new items to be processed\n", $cnt_total); foreach my $nf (@$new_files) { my ($md5, $path, $size, $mtime)= @$nf; # print "md5=[$md5] size=[$size] path=[$path]\n"; - $cnt_processed++; + $cnt_processed++; # NOTE: one counter for several processing steps?? my @upd= process_file ($md5, $path, $size); $cnt_updated++ if (@upd); + + printf ("%s done %d of %d, updated %d\n", ts_ISO(), $cnt_done, $cnt_total, $cnt_updated) if ((++$cnt_done % 100) == 0); } + printf ("%s done %d of %d, updated %d\n", ts_ISO(), $cnt_done, $cnt_total, $cnt_updated); # get filelist again after reintegration to find keys which are no longer in the catalog $fl= $md5cat->{'FLIST'};