From: Frank Lichtenheld Date: Thu, 23 Feb 2006 16:45:46 +0000 (+0000) Subject: Now that the archive isn't as important anymore, use per suite lists X-Git-Tag: switch-to-templates~47 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;ds=sidebyside;h=e2c7b40f0b9352498a642dd8aeae7912b4a00733;p=deb%2Fpackages.git Now that the archive isn't as important anymore, use per suite lists of sections, subsections, and priorities --- diff --git a/bin/create_index_pages b/bin/create_index_pages index 1cce8f1..55e9f47 100755 --- a/bin/create_index_pages +++ b/bin/create_index_pages @@ -63,8 +63,8 @@ foreach my $s (@SUITES) { desc => encode_entities( $index_title, '"' ), lang => $lang ), title( $index_title ), '
'; - my $i = 0; my $num_sections = keys %{$subsections->{$s}{'us'}}; - foreach my $ssec ((keys %{$subsections->{$s}{'us'}}, 'virtual')) { + my $i = 0; my $num_sections = keys %{$subsections->{$s}}; + foreach my $ssec ((keys %{$subsections->{$s}}, 'virtual')) { next if $ssec eq '-'; if ($sections_descs{$ssec}) { print {$pages{$key}{$lang}{index}{fh}} "
".dgettext( 'sections', $sections_descs{$ssec}[0] )."
".dgettext( 'sections', $sections_descs{$ssec}[1] )."
\n"; @@ -104,7 +104,7 @@ foreach my $s (@SUITES) { lang => 'en' ), title( $title ), '
'; - foreach my $sec (keys %{$sections->{$s}{'us'}}) { + foreach my $sec (keys %{$sections->{$s}}) { mkpath ( "$wwwdir/$key/$sec" ); open $pages{$key}{$sec}{fh}, '>', "$wwwdir/$key/$sec/index.en.html.new" or die "can't open index file for output: $!"; @@ -116,7 +116,7 @@ foreach my $s (@SUITES) { lang => 'en' ), title( $title ), '
'; } - foreach my $ssec ((keys %{$subsections->{$s}{'us'}}, 'virtual')) { + foreach my $ssec ((keys %{$subsections->{$s}}, 'virtual')) { next if $ssec eq '-'; mkpath ( "$wwwdir/$key/$ssec" ); open $pages{$key}{$ssec}{fh}, '>', "$wwwdir/$key/$ssec/index.en.html.new" @@ -129,7 +129,7 @@ foreach my $s (@SUITES) { lang => 'en' ), title( $title ), '
'; } - foreach my $prio (keys %{$priorities->{$s}{'us'}}) { + foreach my $prio (keys %{$priorities->{$s}}) { next if $prio eq '-'; mkpath ( "$wwwdir/$key/$prio" ); open $pages{$key}{$prio}{fh}, '>', "$wwwdir/$key/$prio/index.en.html.new" @@ -203,8 +203,6 @@ while (my ($pkg, $data) = each %packages) { print {$pages{$key}{$section}{fh}} $str or die "couldn't write to output file: $!"; if ($subsection ne '-') { - print STDERR "pages{$key}{$subsection}{fh}\n" - unless $pages{$key}{$subsection}{fh}; print {$pages{$key}{$subsection}{fh}} $str or die "couldn't write to output file: $!"; } @@ -230,7 +228,7 @@ foreach my $s (@SUITES) { rename( "$wwwdir/$key/$sec/index.en.html.new", "$wwwdir/$key/$sec/index.en.html" ); } - foreach my $ssec ((keys %{$subsections->{$s}{'us'}}, 'virtual')) { + foreach my $ssec ((keys %{$subsections->{$s}}, 'virtual')) { next if $ssec eq '-'; print {$pages{$key}{$ssec}{fh}} '
', trailer( "../../" ); close $pages{$key}{$ssec}{fh} or @@ -238,7 +236,7 @@ foreach my $s (@SUITES) { rename( "$wwwdir/$key/$ssec/index.en.html.new", "$wwwdir/$key/$ssec/index.en.html" ); } - foreach my $prio (keys %{$priorities->{$s}{'us'}}) { + foreach my $prio (keys %{$priorities->{$s}}) { next if $prio eq '-'; print {$pages{$key}{$prio}{fh}} '
', trailer( "../../" ); close $pages{$key}{$prio}{fh} or diff --git a/bin/parse-packages b/bin/parse-packages index edc97a1..ca77fbc 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -116,9 +116,9 @@ for my $suite (@SUITES) { $data{'section'} = $section; $data{'subsection'} = $subsection; $data{'priority'} ||= '-'; - $sections{$suite}{$archive}{$section}++; - $subsections{$suite}{$archive}{$subsection}++; - $priorities{$suite}{$archive}{$data{priority}}++; + $sections{$suite}{$section}++; + $subsections{$suite}{$subsection}++; + $priorities{$suite}{$data{priority}}++; my $pkgitem = "$archive $suite $data{'architecture'} ". "$section $subsection $data{'priority'} $data{'version'} $sdescr\0"; my $previtem = $packages_small{$data{'package'}}{$suite}{$data{'architecture'}}