From ace28538cff532f8c5ee31b2cadaf577c0ced079 Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Thu, 23 Feb 2006 02:52:48 +0000 Subject: [PATCH] Simply some stuff due to (suite,arch) now being unique and $archive being 'just' a field --- lib/Packages/DoSearch.pm | 41 +++++++++++++++------------------------- lib/Packages/DoShow.pm | 12 +++--------- 2 files changed, 18 insertions(+), 35 deletions(-) diff --git a/lib/Packages/DoSearch.pm b/lib/Packages/DoSearch.pm index 275cb9b..f55f2cf 100644 --- a/lib/Packages/DoSearch.pm +++ b/lib/Packages/DoSearch.pm @@ -168,20 +168,13 @@ sub do_search { my ($pkg) = $pkg_t =~ m/^(.+)/; # untaint if ($arch ne 'virtual') { - my $real_archive; - if ($archive =~ /^(security|non-US)$/) { - $real_archive = $archive; - $archive = 'us'; - } - - $pkgs{$pkg}{$suite}{$archive}{$version}{$arch} = 1; - $subsect{$pkg}{$suite}{$archive}{$version} = $subsection; - $sect{$pkg}{$suite}{$archive}{$version} = $section + $pkgs{$pkg}{$suite}{$version}{$arch} = 1; + $subsect{$pkg}{$suite}{$version} = $subsection; + $sect{$pkg}{$suite}{$version} = $section unless $section eq 'main'; - $archives{$pkg}{$suite}{$archive}{$version} = $real_archive - if $real_archive; + $archives{$pkg}{$suite}{$version} = $archive; - $desc{$pkg}{$suite}{$archive}{$version} = $desc; + $desc{$pkg}{$suite}{$version} = $desc; } else { $provided_by{$pkg}{$suite} = [ split /\s+/, $desc ]; } @@ -270,28 +263,25 @@ sub print_package { my $str = '

'.sprintf( _g( 'Package %s' ), $pkg ).'

'; $str .= '\n"; return $str; diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm index b5a1287..c9940a1 100644 --- a/lib/Packages/DoShow.pm +++ b/lib/Packages/DoShow.pm @@ -75,19 +75,13 @@ sub do_show { foreach (@results, @non_results) { my $a = $_->[1]; my $s = $_->[2]; - if ($a =~ /^(?:us|security|non-US)$/o) { - $all_suites{$s}++; - } else { - $all_suites{"$s/$a"}++; - } + $all_suites{$s}++; } foreach (suites_sort(keys %all_suites)) { - if (("$suite/$archive" eq $_) - || (!$all_suites{"$suite/$archive"} && ($suite eq $_))) { + if ($suite eq $_) { $$menu .= "[ $_ ] "; } else { - $$menu .= - "[ $_ ] "; + $$menu .= "[ $_ ] "; } } $$menu .= '
'; -- 2.39.2