diff options
Diffstat (limited to 'modules/mirror_cleaner/files')
-rwxr-xr-x | modules/mirror_cleaner/files/orphans_cleaner.pl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/mirror_cleaner/files/orphans_cleaner.pl b/modules/mirror_cleaner/files/orphans_cleaner.pl index f1af3dee..0ab84cfa 100755 --- a/modules/mirror_cleaner/files/orphans_cleaner.pl +++ b/modules/mirror_cleaner/files/orphans_cleaner.pl @@ -34,11 +34,11 @@ foreach my $a ( @arches ) { $binary_hdlist = "$rpm_path/media_info/hdlist.cz"; $source_hdlist = "$srpm_path/media_info/hdlist.cz"; - next if not -f $source_hdlist; - next if not -f $binary_hdlist; + next if not -f $source_hdlist; + next if not -f $binary_hdlist; - next if stat($source_hdlist)->size() <= 64; - next if stat($binary_hdlist)->size() <= 64; + next if stat($source_hdlist)->size() <= 64; + next if stat($binary_hdlist)->size() <= 64; open(my $hdfh, "zcat '$binary_hdlist' 2>/dev/null |") or die "Can't open $_"; while (my $hdr = stream2header($hdfh)) { @@ -60,15 +60,15 @@ foreach my $a ( @arches ) { # Be safe, maybe hdlists were not in sync next if -f "$srpm_path/$s"; foreach my $rpm ( @{$hash{$s}} ) { - $rpm = "$rpm_path/$rpm"; - # sometimes, packages are removed without hdlist to be updated - next if not -f "$rpm"; - if (time() > $move_delay + stat("$rpm")->ctime()) { - ( $dest_rpm = $rpm ) =~ s/$path/$dest_path/; - my $dir = dirname $dest_rpm; - make_path $dir if not -d $dir; - move($rpm, $dest_rpm) - } + $rpm = "$rpm_path/$rpm"; + # sometimes, packages are removed without hdlist to be updated + next if not -f "$rpm"; + if (time() > $move_delay + stat("$rpm")->ctime()) { + ( $dest_rpm = $rpm ) =~ s/$path/$dest_path/; + my $dir = dirname $dest_rpm; + make_path $dir if not -d $dir; + move($rpm, $dest_rpm) + } } } } |