From: Frank Lichtenheld Date: Thu, 2 Feb 2006 14:44:26 +0000 (+0000) Subject: Completly remove the XML stuff. I never really used it and currently it X-Git-Tag: switch-to-templates~186 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=75b12a4485e23464c08413b8183f790fcfaca412;p=deb%2Fpackages.git Completly remove the XML stuff. I never really used it and currently it just clobbers the code --- diff --git a/cgi-bin/search_packages.pl b/cgi-bin/search_packages.pl index 4372d55..0723387 100755 --- a/cgi-bin/search_packages.pl +++ b/cgi-bin/search_packages.pl @@ -367,7 +367,7 @@ if ($format eq 'html') { } if ($too_many_hits) { -print "

Your search was too wide so we will only display exact matches. At least $too_many_hits results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.

"; + print "

Your search was too wide so we will only display exact matches. At least $too_many_hits results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.

"; } if (!@results) { @@ -453,32 +453,6 @@ unless ($search_on_sources) { } print "\n"; } - } elsif ($format eq 'xml') { - require RDF::Simple::Serialiser; - my $rdf = new RDF::Simple::Serialiser; - $rdf->addns( debpkg => 'http://packages.debian.org/xml/01-debian-packages-rdf' ); - my @triples; - foreach my $pkg (sort keys %pkgs) { - foreach my $ver (@SUITES) { - if (exists $pkgs{$pkg}{$ver}) { - my @versions = version_sort keys %{$pkgs{$pkg}{$ver}}; - foreach my $version (@versions) { - my $id = "$ROOT/$ver/$sect{$pkg}{$ver}{$version}/$pkg/$version"; - push @triples, [ $id, 'debpkg:package', $pkg ]; - push @triples, [ $id, 'debpkg:version', $version ]; - push @triples, [ $id, 'debpkg:section', $sect{$pkg}{$ver}{$version}, ]; - push @triples, [ $id, 'debpkg:suite', $ver ]; - push @triples, [ $id, 'debpkg:shortdesc', $desc{$pkg}{$ver}{$version} ]; - push @triples, [ $id, 'debpkg:part', $part{$pkg}{$ver}{$version} || 'main' ]; - foreach my $arch (sort keys %{$pkgs{$pkg}{$ver}{$version}}) { - push @triples, [ $id, 'debpkg:architecture', $arch ]; - } - } - } - } - } - - print $rdf->serialise(@triples); } } else { foreach (@results) { @@ -522,29 +496,6 @@ unless ($search_on_sources) { } print "\n"; } - } elsif ($format eq 'xml') { - require RDF::Simple::Serialiser; - my $rdf = new RDF::Simple::Serialiser; - $rdf->addns( debpkg => 'http://packages.debian.org/xml/01-debian-packages-rdf' ); - my @triples; - foreach my $pkg (sort keys %pkgs) { - foreach my $ver (@SUITES) { - if (exists $pkgs{$pkg}{$ver}) { - my $id = "$ROOT/$ver/source/$pkg"; - - push @triples, [ $id, 'debpkg:package', $pkg ]; - push @triples, [ $id, 'debpkg:type', 'source' ]; - push @triples, [ $id, 'debpkg:section', $sect{$pkg}{$ver}{source} ]; - push @triples, [ $id, 'debpkg:version', $pkgs{$pkg}{$ver} ]; - push @triples, [ $id, 'debpkg:part', $part{$pkg}{$ver}{source} || 'main' ]; - - foreach my $bp (@{$binaries{$pkg}{$ver}}) { - push @triples, [ $id, 'debpkg:binary', $bp ]; - } - } - } - } - print $rdf->serialise(@triples); } }