From: Frank Lichtenheld Date: Mon, 10 Dec 2007 20:26:35 +0000 (+0100) Subject: Packages::DoDownload: Fix a 'uninitialized value' warning X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=6aaace001a1ac83db7753605a36dba9633e7a744;p=deb%2Fpackages.git Packages::DoDownload: Fix a 'uninitialized value' warning Also issue the debug message before actually overwriting the value we want to show. --- diff --git a/lib/Packages/DoDownload.pm b/lib/Packages/DoDownload.pm index a871afd..bb7d073 100644 --- a/lib/Packages/DoDownload.pm +++ b/lib/Packages/DoDownload.pm @@ -72,11 +72,11 @@ sub do_download { debug( "final_result=@$final_result", 1 ); $archive = $final_result->[1]; - my %data = split /\000/, $packages_all{"$pkg $arch $final_result->[7]"}; + my %data = split(/\000/, $packages_all{"$pkg $arch $final_result->[7]"}||''); if (!%data && $arch ne 'all' && $final_result->[3] eq 'all') { %data = split /\000/, $packages_all{"$pkg all $final_result->[7]"}; - $arch = 'all'; debug( "choosing arch 'all' instead of requested arch $arch", 1 ); + $arch = 'all'; # fatal_error( _g( "No such package." )."
". # sprintf( _g( 'Search for the package' ), "$SEARCH_URL/$pkg" ) ) unless %data; }