From 6aaace001a1ac83db7753605a36dba9633e7a744 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Mon, 10 Dec 2007 21:26:35 +0100 Subject: [PATCH] Packages::DoDownload: Fix a 'uninitialized value' warning Also issue the debug message before actually overwriting the value we want to show. --- lib/Packages/DoDownload.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.2