Skip to content
Snippets Groups Projects
Commit 141d85a1 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

format changes

parent b3f002dd
Branches
Tags
No related merge requests found
# #
# $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 =head1 NAME
...@@ -353,8 +353,8 @@ sub check_new_files ...@@ -353,8 +353,8 @@ sub check_new_files
close (FO); close (FO);
} }
push (@main::REPORT, sprintf ("checked %s: %8d (%s)", $md5cat->{'chksum_pgm'}, scalar (@tmp_2chk))); push (@main::REPORT, sprintf ("checked %s: %10d (%s)", $md5cat->{'chksum_pgm'}, scalar (@tmp_2chk)));
push (@main::REPORT, sprintf ("checked openssl: %8d (%s)", $QUEUE_openssl)); push (@main::REPORT, sprintf ("checked openssl: %10d (%s)", $QUEUE_openssl));
(wantarray) ? @res : \@res; (wantarray) ? @res : \@res;
} }
...@@ -523,8 +523,8 @@ this may be obsolete and shold be removed ...@@ -523,8 +523,8 @@ this may be obsolete and shold be removed
} }
close (FI); close (FI);
push (@main::REPORT, sprintf ("retained: %8d (%s)", $cnt_retained, $list)); push (@main::REPORT, sprintf ("retained: %10d (%s)", $cnt_retained, $list));
push (@main::REPORT, sprintf ("dropped: %8d (%s)", $cnt_dropped, $list)); push (@main::REPORT, sprintf ("dropped: %10d (%s)", $cnt_dropped, $list));
return $rc; return $rc;
} }
...@@ -564,7 +564,7 @@ sub digest_md5_list ...@@ -564,7 +564,7 @@ sub digest_md5_list
} }
my $md5= Digest::MD5::File::file_md5_hex ($f); 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] ]); push (@res, [ $md5, $f, $st[7], $st[9] ]);
$cnt++; $cnt++;
......
...@@ -60,6 +60,7 @@ use TA::ObjReg; ...@@ -60,6 +60,7 @@ use TA::ObjReg;
# use TA::Hasher; # use TA::Hasher;
# use TA::Util; # use TA::Util;
use md5cat; use md5cat;
use Util::ts qw(ts_ISO);
my @PAR= (); my @PAR= ();
my $project; my $project;
...@@ -401,16 +402,21 @@ sub refresh_internal ...@@ -401,16 +402,21 @@ sub refresh_internal
# ZZZ # ZZZ
# update the Object registry with new items # 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) foreach my $nf (@$new_files)
{ {
my ($md5, $path, $size, $mtime)= @$nf; my ($md5, $path, $size, $mtime)= @$nf;
# print "md5=[$md5] size=[$size] path=[$path]\n"; # 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); my @upd= process_file ($md5, $path, $size);
$cnt_updated++ if (@upd); $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 # get filelist again after reintegration to find keys which are no longer in the catalog
$fl= $md5cat->{'FLIST'}; $fl= $md5cat->{'FLIST'};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment