Lines 477-484
my $size_output = format_bytes($need_bytes);
|
Link Here
|
---|
|
477 |
|
477 |
|
478 |
print "$size_output will be downloaded into archive.\n"; |
478 |
print "$size_output will be downloaded into archive.\n"; |
479 |
|
479 |
|
480 |
print STDERR "$size_output will be downloaded into archive.\n"; |
|
|
481 |
|
482 |
download_urls("archive", sort keys %urls_to_download); |
480 |
download_urls("archive", sort keys %urls_to_download); |
483 |
|
481 |
|
484 |
|
482 |
|
Lines 509-514
sub collect_children {
|
Link Here
|
---|
|
509 |
} |
507 |
} |
510 |
|
508 |
|
511 |
if ( get_variable( "recreate_packages" ) eq 'yes' ) { |
509 |
if ( get_variable( "recreate_packages" ) eq 'yes' ) { |
|
|
510 |
my $nthreads = get_variable("nthreads"); |
512 |
my @gzip_files = (); |
511 |
my @gzip_files = (); |
513 |
my @children = (); |
512 |
my @children = (); |
514 |
my $pid; |
513 |
my $pid; |
Lines 535-543
if ( get_variable( "recreate_packages" ) eq 'yes' ) {
|
Link Here
|
---|
|
535 |
if ( $pid == 0 ) { |
534 |
if ( $pid == 0 ) { |
536 |
chdir get_variable("mirror_path")."/$path"; |
535 |
chdir get_variable("mirror_path")."/$path"; |
537 |
|
536 |
|
538 |
exec "apt-ftparchive $filetype $source > $packages\n"; |
537 |
exec "exec apt-ftparchive $filetype $source > $packages\n"; |
539 |
} |
538 |
} |
540 |
push @children, $pid; |
539 |
push @children, $pid; |
|
|
540 |
if ( scalar @children >= $nthreads ) { |
541 |
my $dead = wait(); |
542 |
@childrens = grep { $_ != $dead } @childrens; |
543 |
} |
541 |
} |
544 |
} |
542 |
collect_children( @children ); |
545 |
collect_children( @children ); |
543 |
|
546 |
|
Lines 552-560
if ( get_variable( "recreate_packages" ) eq 'yes' ) {
|
Link Here
|
---|
|
552 |
if ( $pid == 0 ) { |
555 |
if ( $pid == 0 ) { |
553 |
chdir get_variable("mirror_path")."/$path"; |
556 |
chdir get_variable("mirror_path")."/$path"; |
554 |
|
557 |
|
555 |
exec "gzip < $packages > $packages.gz\n"; |
558 |
exec "exec gzip < $packages > $packages.gz\n"; |
556 |
} |
559 |
} |
557 |
push @children, $pid; |
560 |
push @children, $pid; |
|
|
561 |
if ( scalar @children >= $nthreads ) { |
562 |
my $dead = wait(); |
563 |
@childrens = grep { $_ != $dead } @childrens; |
564 |
} |
558 |
} |
565 |
} |
559 |
collect_children( @children ); |
566 |
collect_children( @children ); |
560 |
} else { |
567 |
} else { |