Package: whohas
Version: 0.24-1
Severity: normal
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
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.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQIcBAEBCAAGBQJM+NvZAAoJEJmGUYuaqqClRnkP/irdsqwcmenKzJOXqPRZfZgb
/RkG8fxkTOllgtjxbyrsMe5E5bd0fgIcw6ot6rBUp6yMI30CyAxGMlvYl9LGCr8I
Ds/MTTJniiqWcGb4F2XEO8xyGjKwQ6uowlTBtlFG71xctAv5YvZNnjLZABVURi+Z
Rp8xgKRSerKTCzyNql73M198s0+wkksN3pGIncUE9o3sY0Z4mj5morP3Lza1V3RK
FpnOsJForjP5F26U2PpGq4Gzk6y02aTj8nyRAatOjYt6P9uDsvqZPfoFfK6UPLnk
J/1ujYVtqY3qVIUsGNG2EfUTTp/M+2jhmqYAtAfz7c166VuZ4pz54t2eaJMpsIZr
oCP/s/QrorD+lX06ewNu3SCxp8G+iqmP8SH4u04VPycruRJq9YCn11R8RqPoJILx
bKd/lVNcvCGwIAk5T6mEniiBuHr0GRhVrfKqVRVG9tMddNypvY3ZE0FafbDrPfNQ
zZJecsvJ3WYhVQ/8at0lYIzPvmDHcEZf8t6sGw7WbaLQkQv0TdZV7JVegGMKEbCG
PjWVK3x2k35k4kOQSJMwneZP+jKWEQWA8sreuoPOJKoXA9t7ljYUihKHdaXWOxSK
r8jrytIavOt4ZhDa3pKMlarqQ7qAjeu/f5W7dM63nEqxxpFUrLo+ZmMJP+q/2lTL
aV50r2XTrHauNl1Hfrm6
=iO9f
-----END PGP SIGNATURE-----
--- /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/.*\