|
|
@ -534,14 +534,14 @@ sub ftp { |
|
|
|
# to a non-standard dist. |
|
|
|
my $localfile = "$default_directory/partial/$the_site" . "_" . |
|
|
|
"$distb" . "_dists_" . "$dist" . "_" . "Contents-$arch.gz"; |
|
|
|
my $home = "$default_directory/$the_site" . "_" . "$distb" . |
|
|
|
my $main::home = "$default_directory/$the_site" . "_" . "$distb" . |
|
|
|
"_dists_" . "$dist" . "_" . "Contents-$arch.gz"; |
|
|
|
if (-e "$home") { |
|
|
|
if (-e "$main::home") { |
|
|
|
my $size = |
|
|
|
$ftp->size("$distbase/dists/$dist/Contents-$arch.gz"); |
|
|
|
my $rmtime = |
|
|
|
$ftp->mdtm("$distbase/dists/$dist/Contents-$arch.gz"); |
|
|
|
my ($lmtime) = (stat($home))[9]; |
|
|
|
my ($lmtime) = (stat($main::home))[9]; |
|
|
|
my $file_exist = $ftp->code(); |
|
|
|
print "swim: $distg[0]/Contents-$arch.gz does not exist on the server\n" |
|
|
|
if $file_exist == 550 && $distbase !~ /non-US/ && |
|
|
@ -554,13 +554,13 @@ sub ftp { |
|
|
|
if ($lsize == $size && $complete == 226) { |
|
|
|
print "swim: successful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
} |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
elsif ($lmtime == $rmtime) { |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
@ -583,14 +583,14 @@ sub ftp { |
|
|
|
if ($lsize == $size && $complete == 226) { |
|
|
|
print "swim: successful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
} |
|
|
|
if (-e $home) { |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
if (-e $main::home) { |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -600,14 +600,14 @@ sub ftp { |
|
|
|
make_dir($place); |
|
|
|
my $localfile = "$default_directory/partial/$the_site" . "_" . |
|
|
|
"$distb" . "_dists_" . "$dist" . "_" . "Contents-$arch.gz"; |
|
|
|
my $home = "$place/$the_site" . "_" . "$distb" . |
|
|
|
my $main::home = "$place/$the_site" . "_" . "$distb" . |
|
|
|
"_dists_" . "$dist" . "_" . "Contents-$arch.gz"; |
|
|
|
if (-e "$home") { |
|
|
|
if (-e "$main::home") { |
|
|
|
my $size = |
|
|
|
$ftp->size("$distbase/dists/$dist/Contents-$arch.gz"); |
|
|
|
my $rmtime = |
|
|
|
$ftp->mdtm("$distbase/dists/$dist/Contents-$arch.gz"); |
|
|
|
my ($lmtime) = (stat($home))[9]; |
|
|
|
my ($lmtime) = (stat($main::home))[9]; |
|
|
|
my $file_exist = $ftp->code(); |
|
|
|
print "swim: $distg[0]/Contents-$arch.gz does not exist on the server\n" |
|
|
|
if $file_exist == 550 && $distbase !~ /non-US/ && |
|
|
@ -620,13 +620,13 @@ sub ftp { |
|
|
|
if ($lsize == $size && $complete == 226) { |
|
|
|
print "swim: successful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
} |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
else { |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
@ -649,14 +649,14 @@ sub ftp { |
|
|
|
if ($lsize == $size && $complete == 226) { |
|
|
|
print "swim: successful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
} |
|
|
|
if (-e $home) { |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
if (-e $main::home) { |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -673,14 +673,14 @@ sub ftp { |
|
|
|
!defined $commands->{"Release_only"}) { |
|
|
|
my $localfile = "$default_directory/partial/$the_site" . "_" . |
|
|
|
"$distb" . "_dists_" . "$dist" . "_" . "Contents-$arch.gz"; |
|
|
|
my $home = "$default_directory/$the_site" . "_" . "$distb" . |
|
|
|
my $main::home = "$default_directory/$the_site" . "_" . "$distb" . |
|
|
|
"_dists_" . "$dist" . "_" . "Contents-$arch.gz"; |
|
|
|
if (-e "$home") { |
|
|
|
if (-e "$main::home") { |
|
|
|
my $size = |
|
|
|
$ftp->size("$distbase/dists/$dist/Contents-$arch.gz"); |
|
|
|
my $rmtime = |
|
|
|
$ftp->mdtm("$distbase/dists/$dist/Contents-$arch.gz"); |
|
|
|
my ($lmtime) = (stat($home))[9]; |
|
|
|
my ($lmtime) = (stat($main::home))[9]; |
|
|
|
my $file_exist = $ftp->code(); |
|
|
|
print "swim: $dist/Contents-$arch.gz does not exist on the server\n" |
|
|
|
if $file_exist == 550 && $distbase !~ /non-US/ && |
|
|
@ -693,13 +693,13 @@ sub ftp { |
|
|
|
if ($lsize == $size && $complete == 226) { |
|
|
|
print "swim: successful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
} |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
else { |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
@ -722,14 +722,14 @@ sub ftp { |
|
|
|
if ($lsize == $size && $complete == 226) { |
|
|
|
print "swim: successful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
$cc++ if $commands->{"onec"}; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/Contents-$arch.gz\n"; |
|
|
|
} |
|
|
|
if (-e $home) { |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
if (-e $main::home) { |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -744,18 +744,18 @@ sub ftp { |
|
|
|
############## |
|
|
|
if (defined $commands->{"Packages"}) { |
|
|
|
if ($commands->{"Packages"} eq "DF") { |
|
|
|
my ($home,$localfile,$release_home,$release_localfile); |
|
|
|
my ($main::home,$localfile,$release_home,$release_localfile); |
|
|
|
my $nue = (split(m,/,,$dist))[0]; |
|
|
|
$section ne "single" && $distb !~ /non-US|experimental/ |
|
|
|
? ($home = |
|
|
|
? ($main::home = |
|
|
|
"$default_directory/$the_site" . "_" . "$distb" . "_dists_" . |
|
|
|
"$dist" . "_" . "$section" . "_" . "binary-$arch" . |
|
|
|
"_" . "Packages.gz") |
|
|
|
: $nue eq "project" |
|
|
|
? ($home = |
|
|
|
? ($main::home = |
|
|
|
"$default_directory/$the_site" . "_" . "$distb" . |
|
|
|
"_" . "Packages.gz") |
|
|
|
: ($home = |
|
|
|
: ($main::home = |
|
|
|
"$default_directory/$the_site" . "_" . "$distb" . "_" |
|
|
|
. "$nue" . "_" . "binary-$arch" . "_" . "Packages.gz"); |
|
|
|
$section ne "single" && $distb !~ /non-US|experimental/ |
|
|
@ -770,10 +770,10 @@ sub ftp { |
|
|
|
: ($localfile = |
|
|
|
"$default_directory/partial/$the_site" . "_" . "$distb" . "_" |
|
|
|
. "$nue" . "_" . "binary-$arch" . "_" . "Packages.gz"); |
|
|
|
($release_home = $home) =~ s,Packages.gz,Release,; |
|
|
|
($release_home = $main::home) =~ s,Packages.gz,Release,; |
|
|
|
($release_localfile = $localfile) =~ s,Packages.gz,Release,; |
|
|
|
if (-e "$home") { |
|
|
|
my ($lmtime) = (stat($home))[9]; |
|
|
|
if (-e "$main::home") { |
|
|
|
my ($lmtime) = (stat($main::home))[9]; |
|
|
|
my $remotefile; |
|
|
|
$section ne "single" |
|
|
|
? ($remotefile = |
|
|
@ -789,9 +789,9 @@ sub ftp { |
|
|
|
get($ftp,$remotefile,$localfile); |
|
|
|
my $lsize = (stat($localfile))[7]; |
|
|
|
my $complete = $ftp->code(); |
|
|
|
two26($complete,$size,$lsize,$home,$localfile, |
|
|
|
two26($complete,$size,$lsize,$main::home,$localfile, |
|
|
|
$section,$arch,$dist,$distb); |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
@ -809,10 +809,10 @@ sub ftp { |
|
|
|
get($ftp,$remotefile,$localfile); |
|
|
|
my $complete = $ftp->code(); |
|
|
|
my $lsize = (stat($localfile))[7]; |
|
|
|
two26($complete,$size,$lsize,$home,$localfile, |
|
|
|
two26($complete,$size,$lsize,$main::home,$localfile, |
|
|
|
$section,$arch,$dist,$distb); |
|
|
|
if (-e $home) { |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
if (-e $main::home) { |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
########### |
|
|
@ -858,18 +858,18 @@ sub ftp { |
|
|
|
elsif ($commands->{"Packages"} ne "DF") { |
|
|
|
my $place = $commands->{"Packages"}; |
|
|
|
make_dir($place); |
|
|
|
my($home,$localfile,$release_home,$release_localfile); |
|
|
|
my($main::home,$localfile,$release_home,$release_localfile); |
|
|
|
my $nue = (split(m,/,,$dist))[0]; |
|
|
|
$section ne "single" && $distb !~ /non-US|experimental/ |
|
|
|
? ($home = |
|
|
|
? ($main::home = |
|
|
|
"$place/$the_site" . "_" . "$distb" . "_dists_" . |
|
|
|
"$dist" . "_" . "$section" . "_" . "binary-$arch" . |
|
|
|
"_" . "Packages.gz") |
|
|
|
: $nue eq "project" |
|
|
|
? ($home = |
|
|
|
? ($main::home = |
|
|
|
"$place/$the_site" . "_" . "$distb" . |
|
|
|
"_" . "Packages.gz") |
|
|
|
: ($home = |
|
|
|
: ($main::home = |
|
|
|
"$place/$the_site" . "_" . "$distb" . "_" |
|
|
|
. "$nue" . "_" . "binary-$arch" . "_" . "Packages.gz"); |
|
|
|
$section ne "single" && $distb !~ /non-US|experimental/ |
|
|
@ -884,10 +884,10 @@ sub ftp { |
|
|
|
: ($localfile = |
|
|
|
"$default_directory/partial/$the_site" . "_" . "$distb" . "_" |
|
|
|
. "$nue" . "_" . "binary-$arch" . "_" . "Packages.gz"); |
|
|
|
($release_home = $home) =~ s,Packages.gz,Release,; |
|
|
|
($release_home = $main::home) =~ s,Packages.gz,Release,; |
|
|
|
($release_localfile = $localfile) =~ s,Packages.gz,Release,; |
|
|
|
if (-e "$home") { |
|
|
|
my ($lmtime) = (stat($home))[9]; |
|
|
|
if (-e "$main::home") { |
|
|
|
my ($lmtime) = (stat($main::home))[9]; |
|
|
|
my $remotefile; |
|
|
|
$section ne "single" |
|
|
|
? ($remotefile = |
|
|
@ -903,9 +903,9 @@ sub ftp { |
|
|
|
get($ftp,$remotefile,$localfile); |
|
|
|
my $lsize = (stat($localfile))[7]; |
|
|
|
my $complete = $ftp->code(); |
|
|
|
two26($complete,$size,$lsize,$home,$localfile, |
|
|
|
two26($complete,$size,$lsize,$main::home,$localfile, |
|
|
|
$section,$arch,$dist,$distb); |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
@ -923,10 +923,10 @@ sub ftp { |
|
|
|
get($ftp,$remotefile,$localfile); |
|
|
|
my $complete = $ftp->code(); |
|
|
|
my $lsize = (stat($localfile))[7]; |
|
|
|
two26($complete,$size,$lsize,$home,$localfile, |
|
|
|
two26($complete,$size,$lsize,$main::home,$localfile, |
|
|
|
$section,$arch,$dist,$distb); |
|
|
|
if (-e $home) { |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
if (-e $main::home) { |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
########### |
|
|
@ -976,18 +976,18 @@ sub ftp { |
|
|
|
################################ |
|
|
|
if ((!defined $commands->{"Contents"} && |
|
|
|
!defined $commands->{"Packages"}) || defined $Go_on) { |
|
|
|
my ($home,$localfile,$release_home,$release_localfile); |
|
|
|
my ($main::home,$localfile,$release_home,$release_localfile); |
|
|
|
my $nue = (split(m,/,,$dist))[0]; |
|
|
|
$section ne "single" && $distb !~ /non-US|experimental/ |
|
|
|
? ($home = |
|
|
|
? ($main::home = |
|
|
|
"$default_directory/$the_site" . "_" . "$distb" . "_dists_" . |
|
|
|
"$dist" . "_" . "$section" . "_" . "binary-$arch" . |
|
|
|
"_" . "Packages.gz") |
|
|
|
: $nue eq "project" |
|
|
|
? ($home = |
|
|
|
? ($main::home = |
|
|
|
"$default_directory/$the_site" . "_" . "$distb" . |
|
|
|
"_" . "Packages.gz") |
|
|
|
: ($home = |
|
|
|
: ($main::home = |
|
|
|
"$default_directory/$the_site" . "_" . "$distb" . "_" |
|
|
|
. "$nue" . "_" . "binary-$arch" . "_" . "Packages.gz"); |
|
|
|
$section ne "single" && $distb !~ /non-US|experimental/ |
|
|
@ -1002,11 +1002,11 @@ sub ftp { |
|
|
|
: ($localfile = |
|
|
|
"$default_directory/partial/$the_site" . "_" . "$distb" . "_" |
|
|
|
. "$nue" . "_" . "binary-$arch" . "_" . "Packages.gz"); |
|
|
|
($release_home = $home) =~ s,Packages.gz,Release,; |
|
|
|
($release_home = $main::home) =~ s,Packages.gz,Release,; |
|
|
|
($release_localfile = $localfile) =~ s,Packages.gz,Release,; |
|
|
|
if (-e "$home" && !$commands->{"Release_only"} && |
|
|
|
if (-e "$main::home" && !$commands->{"Release_only"} && |
|
|
|
!defined $Go_on) { |
|
|
|
my ($lmtime) = (stat($home))[9]; |
|
|
|
my ($lmtime) = (stat($main::home))[9]; |
|
|
|
my $remotefile; |
|
|
|
$section ne "single" |
|
|
|
? ($remotefile = |
|
|
@ -1022,12 +1022,12 @@ sub ftp { |
|
|
|
get($ftp,$remotefile,$localfile); |
|
|
|
my $lsize = (stat($localfile))[7]; |
|
|
|
my $complete = $ftp->code(); |
|
|
|
two26($complete,$size,$lsize,$home,$localfile, |
|
|
|
two26($complete,$size,$lsize,$main::home,$localfile, |
|
|
|
$section,$arch,$dist,$distb); |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
elsif (!-e "$home" && !$commands->{"Release_only"} && |
|
|
|
elsif (!-e "$main::home" && !$commands->{"Release_only"} && |
|
|
|
!defined $Go_on ) { |
|
|
|
my $remotefile; |
|
|
|
$section ne "single" |
|
|
@ -1043,10 +1043,10 @@ sub ftp { |
|
|
|
get($ftp,$remotefile,$localfile); |
|
|
|
my $complete = $ftp->code(); |
|
|
|
my $lsize = (stat($localfile))[7]; |
|
|
|
two26($complete,$size,$lsize,$home,$localfile, |
|
|
|
two26($complete,$size,$lsize,$main::home,$localfile, |
|
|
|
$section,$arch,$dist,$distb); |
|
|
|
if (-e $home) { |
|
|
|
utime(time,$rmtime,$home); |
|
|
|
if (-e $main::home) { |
|
|
|
utime(time,$rmtime,$main::home); |
|
|
|
} |
|
|
|
} |
|
|
|
########### |
|
|
@ -1155,7 +1155,7 @@ sub download { |
|
|
|
# Packages printout for ftp 226 success and the correct size |
|
|
|
sub two26 { |
|
|
|
|
|
|
|
my ($complete,$size,$lsize,$home,$localfile,$section,$arch,$dist,$distb) |
|
|
|
my ($complete,$size,$lsize,$main::home,$localfile,$section,$arch,$dist,$distb) |
|
|
|
= @_; |
|
|
|
|
|
|
|
if ($complete == 226 && $size == $lsize) { |
|
|
@ -1166,8 +1166,8 @@ sub two26 { |
|
|
|
if $section eq "single" && $distb !~ /non-US/; |
|
|
|
print "swim: successful retrieval of $distp[0]/non-US/$distp[1]/Packages.gz\n" |
|
|
|
if $distb =~ /non-US/ && $section !~ "non-US"; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
my @distp = split(m,/,,$dist); |
|
|
@ -1185,12 +1185,12 @@ sub two26 { |
|
|
|
# check download of Release file |
|
|
|
sub two26_r { |
|
|
|
|
|
|
|
my ($complete,$size,$lsize,$home,$localfile,$section,$arch,$dist) = @_; |
|
|
|
my ($complete,$size,$lsize,$main::home,$localfile,$section,$arch,$dist) = @_; |
|
|
|
|
|
|
|
if ($complete == 226 && $size == $lsize) { |
|
|
|
#print "swim: successful retrieval of $dist/$section/binary-$arch/Packages.gz\n"; |
|
|
|
rename("$localfile","$home") |
|
|
|
or system "$mv", "$localfile", "$home"; |
|
|
|
rename("$localfile","$main::home") |
|
|
|
or system "$mv", "$localfile", "$main::home"; |
|
|
|
} |
|
|
|
else { |
|
|
|
print "swim: unsuccessful retrieval of $dist/$section/binary-$arch/Packages.gz\n"; |
|
|
|