diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-09-05 08:49:39 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-09-05 08:49:39 +0000 |
commit | cbb346bd3a06f1af56581a7f34d424bc6e29941d (patch) | |
tree | 4ce2b8474e15259d4a4c5cc9fb9112db25eb1233 /urpm | |
parent | ca2d9a7df0ccfba3d040d65cfc95eb2d771732af (diff) | |
download | urpmi-cbb346bd3a06f1af56581a7f34d424bc6e29941d.tar urpmi-cbb346bd3a06f1af56581a7f34d424bc6e29941d.tar.gz urpmi-cbb346bd3a06f1af56581a7f34d424bc6e29941d.tar.bz2 urpmi-cbb346bd3a06f1af56581a7f34d424bc6e29941d.tar.xz urpmi-cbb346bd3a06f1af56581a7f34d424bc6e29941d.zip |
Fix bug 18234 : force download of ftp files when the timestamp couldn't be determined
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/download.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index 7afdbc94..05383a1a 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -304,8 +304,6 @@ sub sync_curl { and $cur_ftp_file = shift @ftp_files; eval { $ftp_files_info{$cur_ftp_file}{time} = Date::Manip::ParseDate($1); - #- remove day and hour. - $ftp_files_info{$cur_ftp_file}{time} =~ s/(\d{6}).{4}(.*)/$1$2/; }; } } @@ -322,9 +320,9 @@ sub sync_curl { foreach (keys %ftp_files_info) { my ($lfile) = m|/([^/]*)$| or next; #- strange if we can't parse it correctly. my $ltime = eval { Date::Manip::ParseDate(scalar gmtime((stat $1)[9])) }; - $ltime =~ s/(\d{6}).{4}(.*)/$1$2/; #- remove day and hour. - -s $lfile == $ftp_files_info{$_}{size} && $ftp_files_info{$_}{time} eq $ltime or - push @ftp_files, $_; + $ltime or next; #- couldn't parse date, assume files are different (bug 18234) + -s $lfile == $ftp_files_info{$_}{size} && $ftp_files_info{$_}{time} eq $ltime + or push @ftp_files, $_; } } } |