my $sdescr = $descr;
$sdescr =~ s/\n.*//s;
+ my $section = 'main';
+ my $subsection = $data{section};
+ if ($data{section} && ($data{section} =~ m=/=o)) {
+ ($section, $subsection) = split m=/=o, $data{section}, 2;
+ }
$packages_small{$data{'package'}} .= "$suite $data{'architecture'} ".
- "$data{'section'} $data{'priority'} $data{'version'} $sdescr\000";
+ "$section $subsection $data{'priority'} $data{'version'} $sdescr\000";
$sources_packages{$src} .=
"$data{'package'} $data{'architecture'} $data{'version'}\000";
}
if ($exact) {
my $result = $packages{$keyword};
foreach (split /\000/, $result) {
- my @data = split ( /\s/, $_, 6 );
- #FIXME, should be done on db generation
- if ($data[2] =~ m,/,) {
- $data[2] =~ s,/.*$,,;
- } else {
- $data[2] = 'main';
- }
+ my @data = split ( /\s/, $_, 7 );
print "DEBUG: Considering entry ".join( ':', @data)."<br>" if $debug > 2;
if ($suites{$data[0]} && ($archs{$data[1]} || $data[1] eq 'all')
&& $sections{$data[2]}) {
(index($pkg, $keyword) >= 0) or next;
#$pkg =~ /\Q$keyword\E/ or next;
foreach (split /\000/, $packages{$pkg}) {
- my @data = split ( /\s/, $_, 6 );
- #FIXME, should be done on db generation
- if ($data[2] =~ m,/,) {
- $data[2] =~ s,/.*$,,;
- } else {
- $data[2] = 'main';
- }
+ my @data = split ( /\s/, $_, 7 );
print "DEBUG: Considering entry ".join( ':', @data)."<br>" if $debug > 2;
if ($suites{$data[0]} && ($archs{$data[1]} || $data[1] eq 'all')
&& $sections{$data[2]}) {
unless ($search_on_sources) {
foreach (@results) {
- my ($pkg_t, $suite, $arch, $section, $priority, $version, $desc) = @$_;
+ my ($pkg_t, $suite, $arch, $section, $subsection,
+ $priority, $version, $desc) = @$_;
my ($package) = $pkg_t =~ m/^(.+)/; # untaint
$pkgs{$package}{$suite}{$version}{$arch} = 1;
- $sect{$package}{$suite}{$version} = 'subsection';
+ $sect{$package}{$suite}{$version} = $subsection;
$part{$package}{$suite}{$version} = $section unless $section eq 'main';
$desc{$package}{$suite}{$version} = $desc;