diff options
-rw-r--r-- | urpm.pm | 10 | ||||
-rw-r--r-- | urpmi.spec | 4 |
2 files changed, 10 insertions, 4 deletions
@@ -217,7 +217,7 @@ sub sync_curl { if (@ftp_files) { my ($cur_ftp_file, %ftp_files_info); - require Date::Manip; + eval { require Date::Manip }; #- prepare to get back size and time stamp of each file. open CURL, join(" ", map { "'$_'" } "/usr/bin/curl", @@ -231,8 +231,10 @@ sub sync_curl { } if (/Last-Modified:\s*(.*)/) { !$cur_ftp_file || exists($ftp_files_info{$cur_ftp_file}{time}) and $cur_ftp_file = shift @ftp_files; - $ftp_files_info{$cur_ftp_file}{time} = Date::Manip::ParseDate($1); - $ftp_files_info{$cur_ftp_file}{time} =~ s/(\d{6}).{4}(.*)/$1$2/; #- remove day and hour. + eval { + $ftp_files_info{$cur_ftp_file}{time} = Date::Manip::ParseDate($1); + $ftp_files_info{$cur_ftp_file}{time} =~ s/(\d{6}).{4}(.*)/$1$2/; #- remove day and hour. + }; } } close CURL; @@ -247,7 +249,7 @@ sub sync_curl { #- use less. foreach (keys %ftp_files_info) { my ($lfile) = /\/([^\/]*)$/ or next; #- strange if we can't parse it correctly. - my $ltime = Date::Manip::ParseDate(scalar gmtime((stat $1)[9])); + 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, $_; @@ -199,6 +199,10 @@ $urpm->update_media; %changelog + +- make require of Date::Manip optional (urpmi manage to continue + evan if Date::Manip is not there of fail due to unknown TZ). + * Wed Apr 23 2003 François Pons <fpons@mandrakesoft.com> 4.3-6mdk - added more log when installing packages. - urpmf: added --sourcerpm, --packager, --buildhost, --url, --uniq |