Package: whohas
Version: 0.24-1
Severity: normal
Tags: patch

Hi,

whohas already search archlinux official packages, but the website was changed.
The attached patch fix whohas function that query archlinux website.

I'll also change the severity to normal, as the feature exist but was "broken".

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-26-generic (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages whohas depends on:
ii  libwww-perl                   5.837-1    simple and consistent interface to
ii  libxml-simple-perl            2.18-3     Perl module for reading and writin
ii  perl                          5.10.1-16  Larry Wall's Practical Extraction

whohas recommends no packages.

whohas suggests no packages.
--- /usr/bin/whohas 2010-04-05 00:42:48.000000000 +0200 +++ /usr/bin/whohas.new 2010-12-03 12:26:01.780263569 +0100 @@ -1115,7 +1124,8 @@ sub arch { my $archbase = "http://www.archlinux.org"; - my @lines = split /\n/, &fetchdoc($archbase."/packages/?arch=i686&repo=&q=".$_[0]."&last_update=&limit=all"); + # if we directly query i686, redirected to the specific package page + my @lines = split /\n/, &fetchdoc($archbase."/packages/?repo=&q=".$_[0]."&last_update=&limit=all"); my @repos; my @names; @@ -1124,7 +1134,7 @@ my @urls; my @sizes; for (my $i = 0; $i < @lines; $i++) { - if ($lines[$i] =~ /\|\<\/td\>//g; @@ -1132,15 +1142,16 @@ push @repos,$temp; } elsif ($a == 4) { push @urls, $archbase.&arch_site_get_url ($lines[$i+$a]); + } elsif ($a == 5) { push @names, &arch_site_ger_cont($lines[$i+$a]); - } elsif ($a == 6) { - $temp =~ s/|<\/span>//g; + } elsif ($a == 7) { + $temp =~ s/|<\/span>//g; push @versions, $temp; } elsif ($a == 10) { push @dates, $temp; } } - # 2 is package group, 5 is description + # 2 is package group push @sizes, ""; $i += 7; } @@ -1153,7 +1164,7 @@ sub arch_site_get_url { my $temp = $_[0]; - $temp =~ s/.*\.*//g; + $temp =~ s/.*\

Reply via email to