Subversion Repositories DevTools

Rev

Rev 7397 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7397 Rev 7406
Line 423... Line 423...
423
    $lastCleanScan = $now;
423
    $lastCleanScan = $now;
424
 
424
 
425
 
425
 
426
    my %tagPkgList;
426
    my %tagPkgList;
427
    #
427
    #
-
 
428
    #   Process all active tag directories ( these have a .config file )
428
    #   Locate all the tags and create a hash of known tags
429
    #   Locate all active tags and create a hash of known tags
429
    #   These are packages that we have queued to be transferred
430
    #   These are packages that we have queued to be transferred
430
    #
431
    #
431
    my @tagList = glob ("$tagRoot/*/*::*");
-
 
432
 
-
 
433
    foreach my $entry ( @tagList )
432
    if (opendir(my $dh, $tagRoot) )
434
    {
433
    {
-
 
434
        while (my $tagDir = readdir($dh) )
-
 
435
        {
-
 
436
            next unless -f catfile($tagRoot, $tagDir, '.config');
-
 
437
            $logger->verbose3 ("TagScan: $tagDir");
-
 
438
 
-
 
439
            my @tagList = glob ("$tagRoot/$tagDir/*::*");
-
 
440
            foreach my $entry ( @tagList )
-
 
441
            {
435
        $entry =~ m~.*/(.*)::(.*)$~;
442
                $entry =~ m~.*/(.*)::(.*)$~;
436
        $tagPkgList{$1 .'__'.$2 . '.tgz'} = 1;
443
                $tagPkgList{$1 .'__'.$2 . '.tgz'} = 1;
-
 
444
            }
-
 
445
        }
-
 
446
        closedir $dh;
437
    }
447
    }
438
 
448
 
439
    #
449
    #
440
    #   Iterate over all the stored tarZips and remove them if they are no longer needed
450
    #   Iterate over all the stored tarZips and remove them if they are no longer needed
441
    #
451
    #
Line 580... Line 590...
580
    $logger->verbose2("triggerTransfer: $tagRoot/*/$tag: @tagList");
590
    $logger->verbose2("triggerTransfer: $tagRoot/*/$tag: @tagList");
581
    foreach my $target ( @tagList )
591
    foreach my $target ( @tagList )
582
    {
592
    {
583
        $logger->verbose2("triggerTransfer: $target");
593
        $logger->verbose2("triggerTransfer: $target");
584
        $target =~ m~^(.*)/~;
594
        $target =~ m~^(.*)/~;
-
 
595
        my $tagDir = $1;
-
 
596
        my $configFile = catfile($tagDir, '.config');
585
        my $triggerFile = catfile($1, '.trigger');
597
        my $triggerFile = catfile($tagDir, '.trigger');
-
 
598
        if ( -f $configFile) {
586
        Utils::TouchFile($conf, $triggerFile);
599
            Utils::TouchFile($conf, $triggerFile);
-
 
600
        } else {
-
 
601
            unlink $target;
-
 
602
        }
587
    }
603
    }
588
}
604
}
589
 
605
 
590
#-------------------------------------------------------------------------------
606
#-------------------------------------------------------------------------------
591
# Function        : resetDailyStatistics 
607
# Function        : resetDailyStatistics