Hello community,

here is the log from the commit of package whohas for openSUSE:Factory checked 
in at 2012-11-18 20:27:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/whohas (Old)
 and      /work/SRC/openSUSE:Factory/.whohas.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "whohas", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/whohas/whohas.changes    2012-02-07 
14:47:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.whohas.new/whohas.changes       2012-11-18 
20:27:45.000000000 +0100
@@ -1,0 +2,23 @@
+Thu Nov 15 19:11:52 UTC 2012 - asterios.dra...@gmail.com
+
+- Replaced the following patches:
+  * debian-versions-511364.patch with debian-versions.patch (updated the fix to
+    correctly show all Debian versions - taken from Debian).
+  * opensuse-searchpath-585596.patch with opensuse.patch (updated the fix to
+    make it work with http://software.opensuse.org/search).
+  * ubuntu-versions-510203.patch with ubuntu-versions.patch (updated the fix to
+    correctly show all Ubuntu versions - taken from Debian).
+- Updated the following patches (taken from Debian):
+  * help-param-513476.patch (added patch description).
+  * manpage-0.24.patch (added patch description).
+  * strictness-510020-510524.patch (added patch description, update man pages).
+- Renamed and Rebased the following patches (taken from Debian):
+  * fedora-search-619873 with fedora-search-619873.patch
+  * openbsd-cache-results-557724 with openbsd-cache-results-557724.patch
+- Rebased the following patches (taken from Debian):
+  * archlinux-url-561536.patch.
+  * dont-mask-vars-560891.patch.
+  * gentoo-result-url-516071.patch.
+  * improve-fetchdoc.patch.
+
+-------------------------------------------------------------------

Old:
----
  debian-versions-511364.patch
  fedora-search-619873
  openbsd-cache-results-557724
  opensuse-searchpath-585596.patch
  ubuntu-versions-510203.patch

New:
----
  debian-versions.patch
  fedora-search-619873.patch
  openbsd-cache-results-557724.patch
  opensuse.patch
  ubuntu-versions.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ whohas.spec ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -17,6 +17,7 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           whohas
 Version:        0.29
 Release:        0
@@ -31,10 +32,10 @@
 Patch1:         manpage-0.23.patch
 # PATCH-FIX-UPSTREAM manpage-0.24.patch asterios.dra...@gmail.com -- Update 
the version number in the manual from 0.23 to 0.24
 Patch2:         manpage-0.24.patch
-# PATCH-FIX-UPSTREAM ubuntu-versions-510203.patch deb#510203 
asterios.dra...@gmail.com -- Show all versions of a package from Ubuntu, not 
just the earliest
-Patch3:         ubuntu-versions-510203.patch
-# PATCH-FIX-UPSTREAM debian-versions-511364.patch deb#511364 
asterios.dra...@gmail.com -- Providing output for all Debian distributions
-Patch4:         debian-versions-511364.patch
+# PATCH-FIX-UPSTREAM ubuntu-versions.patch deb#670675 
asterios.dra...@gmail.com -- Show all versions of a package from Ubuntu, not 
just the earliest
+Patch3:         ubuntu-versions.patch
+# PATCH-FIX-UPSTREAM debian-versions.patch deb#655497 
asterios.dra...@gmail.com -- Providing output for all Debian distributions
+Patch4:         debian-versions.patch
 # PATCH-FIX-UPSTREAM help-param-513476.patch deb#513476 
asterios.dra...@gmail.com -- Handle the --help parameter instead of assuming it 
is a package name
 Patch5:         help-param-513476.patch
 # PATCH-FIX-UPSTREAM strictness-510020-510524.patch deb#510020 deb#510524 
asterios.dra...@gmail.com -- Add a --strict option to output only exactly 
matching package names
@@ -43,21 +44,21 @@
 Patch7:         gentoo-result-url-516071.patch
 # PATCH-FIX-OPENSUSE improve-fetchdoc.patch asterios.dra...@gmail.com -- Shift 
some of the burden in sub fetchdoc onto the LWP::UserAgent class. This also 
allows us to process XML files without breaking the first line
 Patch8:         improve-fetchdoc.patch
-# PATCH-FIX-UPSTREAM openbsd-cache-results-557724 deb#557724 
asterios.dra...@gmail.com -- For OpenBSD, use @name to loop through a cached 
list, not @repos which is never populated
-Patch9:         openbsd-cache-results-557724
+# PATCH-FIX-UPSTREAM openbsd-cache-results-557724.patch deb#557724 
asterios.dra...@gmail.com -- For OpenBSD, use @name to loop through a cached 
list, not @repos which is never populated
+Patch9:         openbsd-cache-results-557724.patch
 # PATCH-FIX-UPSTREAM dont-mask-vars-560891.patch deb#560891 
asterios.dra...@gmail.com -- Remove a double-declaration of @dates
 Patch10:        dont-mask-vars-560891.patch
-# PATCH-FIX-OPENSUSE opensuse-searchpath-585596.patch deb#585596 
asterios.dra...@gmail.com -- Update search URL for openSUSE repositories
-Patch11:        opensuse-searchpath-585596.patch
 # PATCH-FIX-OPENSUSE archlinux-url-561536.patch deb#561536 
asterios.dra...@gmail.com -- Update search URL for Arch repositories
-Patch12:        archlinux-url-561536.patch
-# PATCH-FIX-OPENSUSE fedora-search-619873 deb#619873 asterios.dra...@gmail.com 
-- Support Fedora's package listing
-Patch13:        fedora-search-619873
+Patch11:        archlinux-url-561536.patch
+# PATCH-FIX-OPENSUSE fedora-search-619873.patch deb#619873 
asterios.dra...@gmail.com -- Support Fedora's package listing
+Patch12:        fedora-search-619873.patch
+# PATCH-FIX-UPSTREAM opensuse.patch asterios.dra...@gmail.com -- Fix openSUSE 
packages search
+Patch13:        opensuse.patch
 Requires:       perl = %{perl_version}
 Requires:       perl-XML-Simple
 Requires:       perl-libwww-perl
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 whohas is a command line tool that allows querying several package lists at
@@ -76,34 +77,32 @@
 %setup -q
 %patch0
 %patch1 -p1
-%patch2
+%patch2 -p1
 %patch3 -p1
-%patch4
-%patch5
-%patch6
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
-%patch11
+%patch11 -p1
 %patch12 -p1
 %patch13 -p1
 
-chmod go+rx html_assets
-chmod -R 644 Changelog LICENSE intro.html intro.txt html_assets/*
+# Fix permissions (fix for rpmlint errors "spurious-executable-perm" and 
"executable-docs")
+chmod 755 html_assets
+chmod 644 Changelog LICENSE intro.html intro.txt html_assets/*
 
 %build
 
 %install
-# install binary
-# INFO: From line 52 on you will find the searchable repositories. If you 
would like to
-#       change them, just edit these lines.
 make DESTDIR=%{buildroot} install
 
 %files
 %defattr(-,root,root,-)
 %doc Changelog LICENSE intro.html intro.txt html_assets/
-%attr(0755,root,root) %{_bindir}/%{name}
+%{_bindir}/%{name}
 %doc %{_mandir}/man1/%{name}.1%{ext_man}
 %doc %dir %{_mandir}/de/man1
 %doc %{_mandir}/de/man1/%{name}.1%{ext_man}

++++++ archlinux-url-561536.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -4,9 +4,9 @@
 Reviewed-by: Jonathan Wiltshire <j...@debian.org>
 Last-Update: 2010-12-05
 
---- whohas-0.24.orig/program/whohas    2010-04-05 00:42:48.000000000 +0200
-+++ whohas-0.24/program/whohas         2010-12-03 12:26:01.780263569 +0100
-@@ -1115,7 +1124,8 @@
+--- a/program/whohas
++++ b/program/whohas
+@@ -1071,7 +1071,8 @@ sub aur {
  
  sub arch {
        my $archbase   = "http://www.archlinux.org";;
@@ -16,7 +16,7 @@
  
        my @repos;
        my @names;
-@@ -1124,7 +1134,7 @@
+@@ -1080,7 +1081,7 @@ sub arch {
        my @urls;
        my @sizes;
        for (my $i = 0; $i < @lines; $i++) {
@@ -25,7 +25,7 @@
                        for (my $a = 2; $a < 11;$a++) {
                                my $temp = $lines[$a+$i];
                                $temp =~ s/.*\<td\>|\<\/td\>//g;
-@@ -1132,15 +1142,16 @@
+@@ -1088,15 +1089,16 @@ sub arch {
                                        push @repos,$temp;
                                } elsif ($a == 4) {
                                        push @urls, 
$archbase.&arch_site_get_url ($lines[$i+$a]);
@@ -45,7 +45,7 @@
                        push @sizes, "";
                        $i += 7;
                }
-@@ -1153,7 +1164,7 @@
+@@ -1109,7 +1111,7 @@ sub arch {
  
  sub arch_site_get_url {
        my $temp = $_[0];

++++++ debian-versions-511364.patch -> debian-versions.patch ++++++
--- /work/SRC/openSUSE:Factory/whohas/debian-versions-511364.patch      
2012-02-07 14:47:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.whohas.new/debian-versions.patch        
2012-11-18 20:27:45.000000000 +0100
@@ -1,11 +1,26 @@
---- program/whohas.orig        2011-11-27 23:06:44.000000000 +0200
-+++ program/whohas     2011-12-04 21:49:35.559625150 +0200
-@@ -938,7 +938,7 @@
+From: Yaroslav Halchenko <deb...@onerussian.com>
+Subject: Fetch all versions from the same page for Debian
+
+Similarly to Ubuntu's logic supplied in the previous patch -- fetch all version
+available from the same page without querying each suite separately. This way
+we also get possibly present urls to backports (#655497). Also altogether
+should be more efficient avoiding multiple fetches/parsings.
+
+Origin: Debian
+Bug-Debian: http://bugs.debian.org/655497
+Last-Update: 2012-09-27
+
+## Description: Add unstable and experimental Debian repositories.
+## Origin/Author: Jonathan Wiltshire <deb...@jwiltshire.org.uk>
+## Bug: https://bugs.debian.org/511364
+--- a/program/whohas
++++ b/program/whohas
+@@ -938,7 +938,7 @@ sub debian_size_convert {
  }
  
  sub debian {
 -      my @dists = ( 'stable', 'testing' );
-+      my @dists = ( 'stable', 'testing', 'unstable', 'experimental' );
++      my @dists = ( 'all' );
        &debuntu('http://packages.debian.org','Debian',\@dists,$_[0]);
        return();
  }

++++++ dont-mask-vars-560891.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -7,9 +7,9 @@
  program/whohas |    1 -
  1 file changed, 1 deletion(-)
 
---- whohas-0.23.orig/program/whohas
-+++ whohas-0.23/program/whohas
-@@ -1085,7 +1085,6 @@
+--- a/program/whohas
++++ b/program/whohas
+@@ -1041,7 +1041,6 @@ sub aur {
        my @dates;
        my @urls;
        my @sizes;

++++++ fedora-search-619873.patch ++++++
## Description: Support fedora's package listing
## Origin/Author: m...@debian.org
## Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619873
--- a/program/whohas
+++ b/program/whohas
@@ -187,27 +187,26 @@ sub fedora {
                        for (my $a = 0; $a < @fed_urls; $a++) {
                                my @lines = split /\n/, 
&fetchdoc($baseurl.$fed_urls[0]);
                                for (my $li = 0; $li < @lines; $li++) {
-                                       if ($lines[$li] =~ 
/\/icons\/unknown\.gif/) {
-                                               my @parts = split /\<|\>|\"/, 
$lines[$li];
-                                               my $prev_release = 
$fedora_release - 1;
-                                               $parts[22] =~ 
s/\.fc($fedora_release|$prev_release).+//;
-                                               my ($name,$version) = 
&combos($parts[22]);
-                                               push @dates, 
&month_to_digits($parts[32]);
-                                               $parts[38] =~ s/^\s+//;
-                                               push @sizes, $parts[38];
+                                       if ($lines[$li] =~ /\.rpm<\/a>/) {
+                                               my $line = trim($lines[$li]);
+                                               my @parts = split / +|<|>|"/, 
$line, 10;
+                                               $parts[5] =~ s/\.fc[0-9]+.+$//;
+                                               my ($name,$version) = 
&combos($parts[5]);
+                                               push @dates, 
&month_to_digits($parts[7])." ".$parts[8];
+                                               push @sizes, $parts[9];
                                                push @names, $name;
                                                push @versions, $version;
                                                push @repos, "";
-                                               push @urls, "";
+                                               push @urls, 
"$baseurl$fed_urls[0]/$parts[3]";
                                        }
                                }
                        }
+                       open OUT, ">$file";
+                       for (my $i = 0; $i < @urls;$i++) {
+                               print OUT 
"$names[$i]\t$versions[$i]\t$sizes[$i]\t$dates[$i]\n";
+                       }
+                       close OUT;
                }
-               open OUT, ">$file";
-               for (my $i = 0; $i < @urls;$i++) {
-                       print OUT 
"$names[$i]\t$versions[$i]\t$sizes[$i]\t$dates[$i]\n";
-               }
-               close OUT;
        }
        for (my $i = 0; $i < @names; $i++) {
                if ($names[$i] =~ /$searchy/i) {
++++++ gentoo-result-url-516071.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -6,9 +6,9 @@
 ## DP: information can be found
 
 @DPATCH@
---- whohas-0.23.orig/program/whohas
-+++ whohas-0.23/program/whohas
-@@ -800,6 +800,7 @@
+--- a/program/whohas
++++ b/program/whohas
+@@ -712,6 +712,7 @@ sub cygwin {
  
  sub gentoo {
        my $gentoobase = "http://gentoo-portage.com";;
@@ -16,7 +16,7 @@
        my $distroname = "Gentoo";
        my @names;
        my @versions;
-@@ -821,6 +822,7 @@
+@@ -733,6 +734,7 @@ sub gentoo {
                                                my @dosparts = split /\//, 
$parts[1];
                                                $dosparts[1] =~ / +$/;
                                                my $tempurl = 
$gentoobase."/".$dosparts[0]."/".$dosparts[1];
@@ -24,7 +24,7 @@
                                                my @newlines = split /\n/, 
&fetchdoc($tempurl);
                                                for (my $li = 0; $li < 
@newlines; $li++) {
                                                        if ($newlines[$li] =~ 
/\<li class\=\"[a-z]+ebuildrow\"/) {
-@@ -833,7 +835,7 @@
+@@ -745,7 +747,7 @@ sub gentoo {
                                                                }
                                                                push @names, 
$dosparts[1];
                                                                push @groups, 
$dosparts[0];

++++++ help-param-513476.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -1,16 +1,22 @@
---- program/whohas.orig        2011-11-27 23:06:44.000000000 +0200
-+++ program/whohas     2011-12-04 20:07:30.796085749 +0200
-@@ -71,12 +71,19 @@
+## Description: Handle the --help parameter instead of assuming it is a 
package name.
+## Origin/Author: Jonathan Wiltshire <deb...@jwiltshire.org.uk>
+## Bug: http://bugs.debian.org/513476
+Index: whohas-0.29/program/whohas
+===================================================================
+--- whohas-0.29.orig/program/whohas    2012-01-15 14:39:18.213163043 -0300
++++ whohas-0.29/program/whohas 2012-01-15 14:48:37.161862163 -0300
+@@ -71,12 +71,20 @@
  my @distroSelections;
  my $nothreads;
  my $shallow;
 +my $option_help;
++
  GetOptions(
        "d=s" => \@distroSelections,
        "no-threads" => \$nothreads,
 -      "shallow" => \$shallow
 +      "shallow" => \$shallow,
-+      "help|usage|h" => \$option_help
++      "help|usage|h" => \$option_help,
  );
  
 +if ($option_help) {

++++++ improve-fetchdoc.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -6,14 +6,9 @@
 ## DP: This also allows us to process XML files without breaking the first line
 
 @DPATCH@
---- whohas-0.23.orig/program/whohas
-+++ whohas-0.23/program/whohas
-@@ -1154,37 +1153,21 @@
-               $silent = 1;
-       }
- 
--      $url =~ s/\&amp\;/\&/ig;   # convert &amp; to &
-+      $url =~ s/\&amp\;/\&/ig;        # convert &amp; to &
+--- a/program/whohas
++++ b/program/whohas
+@@ -1146,33 +1146,16 @@ sub fetchdoc {
  
        my $ua = LWP::UserAgent->new;
        $ua->env_proxy;
@@ -39,7 +34,6 @@
 -                      }
 -                      return ();
 -                      last;
-+
 +      my $response = $ua->get($url);
 +      if($response->is_success) {
 +              return $response->decoded_content;

++++++ manpage-0.24.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -1,8 +1,18 @@
---- usr/share/man/man1/whohas.1.orig   2010-02-11 16:28:27.000000000 +0200
-+++ usr/share/man/man1/whohas.1        2011-12-04 20:35:15.530518117 +0200
+Description: Update the version number in the manual from 0.23 to 0.24.
+Author: Jonathan Wiltshire <deb...@jwiltshire.org.uk>
+Forwarded: phi1...@yahoo.com
+
+---
+ usr/share/man/man1/whohas.1 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: whohas-0.29/usr/share/man/man1/whohas.1
+===================================================================
+--- whohas-0.29.orig/usr/share/man/man1/whohas.1       2012-01-15 
14:32:29.366201967 -0300
++++ whohas-0.29/usr/share/man/man1/whohas.1    2012-01-15 14:32:31.994092003 
-0300
 @@ -1,4 +1,4 @@
 -.TH "whohas" "1" "0.23" "Jonathan Wiltshire" ""
-+.TH "whohas" "1" "0.29" "Jonathan Wiltshire" ""
++.TH "whohas" "1" "0.24" "Jonathan Wiltshire" ""
  .SH "NAME"
  .LP 
  whohas \- find packages in various distributions' repositories

++++++ openbsd-cache-results-557724.patch ++++++
For OpenBSD, use @name to loop through a cached list,
not @repos which is never populated.
Status: sent upstream
Reported: http://bugs.debian.org/557724
Author: Jonathan Wiltshire <deb...@jwiltshire.org.uk>

--- a/program/whohas
+++ b/program/whohas
@@ -666,7 +666,7 @@ sub openbsd_older {
                close OUT;
        }
        my $matcher = $_[0];
-       for (my $i = 0; $i < @repos; $i++) {
+       for (my $i = 0; $i < @names; $i++) {
                if ($names[$i] =~ /$matcher/i) {
                        
&pretty_print($cols,@columns,$distroname,$names[$i],$versions[$i],$sizes[$i],$dates[$i],$repos[$i],$urls[$i]);
                }
++++++ opensuse-searchpath-585596.patch -> opensuse.patch ++++++
--- /work/SRC/openSUSE:Factory/whohas/opensuse-searchpath-585596.patch  
2012-02-07 14:47:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.whohas.new/opensuse.patch       2012-11-18 
20:27:45.000000000 +0100
@@ -1,29 +1,87 @@
---- program/whohas.orig        2011-11-27 23:06:44.000000000 +0200
-+++ program/whohas     2011-12-04 20:58:29.272522767 +0200
-@@ -1215,7 +1215,7 @@
-               if ($lines[$i] =~ /div class="search_o_title"/) {
-                       push @names, (split /<\/?h3>/, $lines[($i+2)])[1];
-                       for (my $a = $i+1; $a < $i + 20; $a++) {
+diff -Naur whohas-0.29.orig/program/whohas whohas-0.29/program/whohas
+--- whohas-0.29.orig/program/whohas    2012-11-15 21:10:27.986182597 +0200
++++ whohas-0.29/program/whohas 2012-11-15 21:08:03.244036474 +0200
+@@ -1221,6 +1221,7 @@
+       my $major = $opensuse_major;
+       my $minor = $opensuse_minor;
+       my $opensusebase = "http://software.opensuse.org";;
++      my @allnames;
+       my @names;
+       my @repos;
+       my @groups;
+@@ -1229,39 +1230,46 @@
+       my @sizes;
+       my @dates;
+       my $distroname = "openSUSE";
+-
+-      my @lines = split /\n/, 
&fetchdoc($opensusebase."/search?q=".$_[0]."&baseproject=".$distroname."%3A".$release_string."&lang=en&exclude_debug=true");
+-      my $continuity = 2;
++      my @lines = split /\n/, 
&fetchdoc($opensusebase."/search?q=".$_[0]."&search_devel=false&search_unsupported=false&baseproject=ALL");
+       for (my $i = 0; $i < @lines; $i++) {
+-              if ($lines[$i] =~ /div class="search_o_title"/) {
+-                      push @names, (split /<\/?h3>/, $lines[($i+2)])[1];
+-                      for (my $a = $i+1; $a < $i + 20; $a++) {
 -                              if ($lines[$a] =~ /<h4><a class="blue_over" 
href=/) {
-+                              if ($lines[$a] =~ /<a href=".*" 
class="blue_over">/) {
-                                       my @temps = split /\"\>|\<\/a\>/, 
$lines[$a];
-                                       $temps[1] =~ 
s/\/openSUSE_$major\.$minor$//;
-                                       $temps[1] =~ 
s/^openSUSE\:$major\.$minor\///;
-@@ -1226,7 +1226,7 @@
+-                                      my @temps = split /\"\>|\<\/a\>/, 
$lines[$a];
+-                                      $temps[1] =~ 
s/\/openSUSE_$major\.$minor$//;
+-                                      $temps[1] =~ 
s/^openSUSE\:$major\.$minor\///;
+-                                      $temps[1] =~ s/\/$major\.$minor$//;
+-                                      $temps[1] =~ s/^home/\~/;
+-                                      push @repos, $temps[1];
+-                                      last;
++              # If the page contains "pkg-description" then there was only 
one search result and we got redirected to
++              # 
http://software.opensuse.org/package/$pkgname?search_term=$pkgname
++              if ($lines[$i] =~ /div id="pkg-description"/) {
++                      @allnames = $_[0];
++                      last;
++              }
++              # If there are multiple results then the page contains 
"search-result-txt" followed by the package name
++              if ($lines[$i] =~ /div class="search-result-txt"/) {
++                      push @allnames, (split /href="\/package\/|"/, 
$lines[($i+1)])[1];
++              }
++      }
++      for (my $i = 0; $i < @allnames; $i++) {
++              # For every package the information is in
++              # http://software.opensuse.org/package/$pkgname
++              my @lines = split /\n/, 
&fetchdoc($opensusebase."/package/".$allnames[$i]."");
++              for (my $i = 0; $i < @lines; $i++) {
++                      # Only show openSUSE official packages (otherwise there 
will be a lot of results)
++                      if (($lines[$i] =~ /openSUSE.*official release/) || 
($lines[$i] =~ /openSUSE.*official update/)) {
++                              # Some times the url does not point to the 
respective package's project page but to the respective openSUSE version 
project page
++                              # Difficult to fix because pkgname can be part 
of another package (e.g. kmail is part of kdepim4)
++                              push @urls, (split /href="|"/, $lines[($i)])[1];
++                              for (my $a = $i; $a < $i + 75; $a++) {
++                                      if ($lines[$a] =~ /ul 
class="pkg-typ-options"/) {
++                                              push @versions, (split 
/<\/?li>/, $lines[($a+1)])[1];
++                                              last;
++                                      }
                                }
-                       }
-                       for (my $a = $i + 10; $a < $i + 50; $a++) {
+-                      }
+-                      for (my $a = $i + 10; $a < $i + 50; $a++) {
 -                              if ($lines[$a] =~ /a style="margin-right: 2em"  
href/) {
-+                              if ($lines[$a] =~ /<a href=".*" 
style="margin-right: 1\.2em">/) {
-                                       my @parts = split /\"\>|\<\/a\>/, 
$lines[$a];
-                                       my @segments = split /\-/, $parts[1];
-                                       push @versions, 
$segments[(@segments-2)];
-@@ -1238,7 +1238,7 @@
-                       push @dates,  '';
-                       push @groups, '';
-               }
+-                                      my @parts = split /\"\>|\<\/a\>/, 
$lines[$a];
+-                                      my @segments = split /\-/, $parts[1];
+-                                      push @versions, 
$segments[(@segments-2)];
+-                                      last;
++                              for (my $a = $i; $a < $i + 75; $a++) {
++                                      if ($lines[$a] =~ /a 
class="pkg-options-one-click"/) {
++                                              push @repos, (split 
/href="\/ymp\/|\//, $lines[($a)])[1];
++                                              push @names, (split 
/query=|">/, $lines[($a)])[1];
++                                              last;
++                                      }
+                               }
++                              push @sizes,  '';
++                              push @dates,  '';
++                              push @groups, '';
+                       }
+-                      push @urls,   '';
+-                      push @sizes,  '';
+-                      push @dates,  '';
+-                      push @groups, '';
+-              }
 -              if ($lines[$i] =~ /type:'post', url:'\/search\/search.*'\}\); 
return false;">$continuity<\/a>/) {
-+              if ($lines[$i] =~ /type:'post', url:'\/search.*'\}\); return 
false;">$continuity<\/a>/) {
-                       push @lines,  split /\n/, 
&fetchdoc($opensusebase."?q=".$_[0]."&baseproject=openSUSE:".$release_string.'&p='.$continuity);
-                       $continuity++;
+-                      push @lines,  split /\n/, 
&fetchdoc($opensusebase."?q=".$_[0]."&baseproject=openSUSE:".$release_string.'&p='.$continuity);
+-                      $continuity++;
                }
+       }
+       for (my $i = 0; $i < @repos; $i++) {

++++++ strictness-510020-510524.patch ++++++
--- /var/tmp/diff_new_pack.eEvQdb/_old  2012-11-18 20:27:46.000000000 +0100
+++ /var/tmp/diff_new_pack.eEvQdb/_new  2012-11-18 20:27:46.000000000 +0100
@@ -1,17 +1,20 @@
---- program/whohas.orig        2011-12-04 22:06:29.983293272 +0200
-+++ program/whohas     2011-12-04 22:03:27.597297842 +0200
-@@ -72,20 +72,22 @@
+## Description: Add a --strict option to output only exactly matching package 
names
+## Origin/Author: Jonathan Wiltshire <deb...@jwiltshire.org.uk>
+## Bug: http://bugs.debian.org/510020
+--- a/program/whohas
++++ b/program/whohas
+@@ -72,21 +72,23 @@ my @distroSelections;
  my $nothreads;
  my $shallow;
  my $option_help;
 +my $option_strict;
+ 
  GetOptions(
        "d=s" => \@distroSelections,
        "no-threads" => \$nothreads,
        "shallow" => \$shallow,
--      "help|usage|h" => \$option_help
-+      "help|usage|h" => \$option_help,
-+      "strict|s" => \$option_strict
+       "help|usage|h" => \$option_help,
++      "strict|s" => \$option_strict,
  );
  
  if ($option_help) {
@@ -26,23 +29,23 @@
  } elsif (@ARGV < 1) {
        die "Error:\tPlease specify a search term.\n";
  }
-@@ -1157,6 +1159,10 @@
+@@ -1172,6 +1174,9 @@ sub fetchdoc {
  }
  
  sub pretty_print {
-+      if( $option_strict && trim($_[$cols+2]) ne $ARGV[0])
-+      {
++      if( $option_strict && trim($_[$cols+2]) ne $ARGV[0]) {
 +              return; # strictness enabled, we should print exact matches only
 +      }
        my $n = $_[0];
        my @colwidths = @_[1..$n];
        my @colvals = @_[($n+1)..(@_-1)];
-@@ -1175,6 +1181,14 @@
+@@ -1190,6 +1195,15 @@ sub pretty_print {
        print $colvals[@colvals-1]."\n"; #last column is unrestricted in length
  }
  
 +sub trim($) {
-+      # Perl trim function to remove whitespace from the start and end of the 
string
++      # Perl trim function to remove whitespace from the start and end of the
++      # string
 +      my $string = shift;
 +      $string =~ s/^\s+//;
 +      $string =~ s/\s+$//;
@@ -52,24 +55,106 @@
  sub prep_suse_repo {
        if ($_[0] =~ /http\:\/\/download\.opensuse\.org/) {
                if ($_[0] =~ /repositories/) {
---- usr/share/man/man1/whohas.1.orig   2011-12-04 21:54:41.473617482 +0200
-+++ usr/share/man/man1/whohas.1        2011-12-04 21:56:05.013615388 +0200
-@@ -4,7 +4,7 @@
+--- a/usr/share/man/de/man1/whohas.1
++++ b/usr/share/man/de/man1/whohas.1
+@@ -1,35 +1,38 @@
+-.TH "whohas" "1" "0.23" "Philipp Wesche" ""
++.TH "whohas" "1" "0.29" "Philipp Wesche" ""
+ .SH "NAME"
+-.LP 
++.LP
+ whohas \- findet Pakete in verschiedenen Repositories
+ .SH "SYNTAX"
+-.LP 
+-whohas [\fI\-\-no\-threads\fP] [\fI\-d Dist1[,Dist2[,Dist3 etc.]]\fP] 
\fIpkgname\fP
++.LP
++whohas [\fI\-\-no\-threads\fP] [\fI\-\-shallow\fP] [\fI\-\-strict\fP] [\fI\-d 
Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP
+ .SH "BESCHREIBUNG"
+-.LP 
++.LP
+ whohas ist ein Kommandozeilenprogramm, das verf�gbare Pakete von Arch, 
Debian, Fedora, Gentoo, Mandriva, openSUSE, Slackware (and linuxpackages.net), 
Source Mage, Ubuntu, FreeBSD, NetBSD, OpenBSD, Fink, MacPorts und Cygwin 
findet, die einem Suchbegriff entsprechen.
+ .SH "OPTIONEN"
+-.LP 
+-.TP 
++.LP
++.TP
+ \fB\-\-no\-threads\fR
+ Keine Threads bei der Ausf�hrung, Repositories werden seriell nacheinander 
befragt und jeweils die Antwort abgewartet (sehr viel langsamer)
+-.TP 
++.TP
+ \fB\-\-shallow\fR
+ Nur ein Aufruf pro Server. Bietet weniger Informationen, ist aber schneller. 
Typischerweise sind Informationen �ber Gr��e und Release-Datum der Pakete 
betroffen.
+-.TP 
++.TP
++\fB\-\-strict\fR
++Listet nur die Pakete, die genau \fIpkgname\fP haben wie ihr Name.
++.TP
+ \fB\-d Dist1[,Dist2[,Dist3 etc.]]\fR
+ Durchsucht nur aufgelistete Distributionen. G�ltige Angaben f�r Dist1 etc. 
sind "archlinux", "cygwin", "debian", "fedora", "fink", "freebsd", "gentoo", 
"macports", "mandriva", "netbsd", "openbsd", "opensuse", "slackware", 
"sourcemage", und "ubuntu".
+-.TP 
++.TP
+ \fBpkgname\fR
+ Suchbegriff
+ .SH "DATEIEN"
+ .LP
+ whohas speichert Cachedateien f�r einige Repositories in ~/.whohas
+ .SH "SIEHE AUCH"
+-.LP 
++.LP
+ \fIintro.txt\fP und \fI/usr/share/doc/whohas/intro.html\fP sind alternative 
Quellen �ber whohas.
+ .SH "AUTOR"
+-.LP 
++.LP
+ whohas wird von Philipp Wesche <phi1...@yahoo.com> entwickelt.
+-.LP 
++.LP
+ Diese Dokumentation wurde von Philipp Wesche <phi1...@yahoo.com> geschrieben, 
basierend auf einer Vorlage von Jonathan Wiltshire <deb...@jwiltshire.org.uk> 
f�r das Debian Projekt.
+--- a/usr/share/man/man1/whohas.1
++++ b/usr/share/man/man1/whohas.1
+@@ -1,32 +1,35 @@
+-.TH "whohas" "1" "0.24" "Jonathan Wiltshire" ""
++.TH "whohas" "1" "0.29" "Jonathan Wiltshire" ""
+ .SH "NAME"
+-.LP 
++.LP
  whohas \- find packages in various distributions' repositories
  .SH "SYNTAX"
- .LP 
+-.LP 
 -whohas [\fI\-\-no\-threads\fP] [\fI\-\-shallow\fP] [\fI\-d 
Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP
++.LP
 +whohas [\fI\-\-no\-threads\fP] [\fI\-\-shallow\fP] [\fI\-\-strict\fP] [\fI\-d 
Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP
  .SH "DESCRIPTION"
- .LP 
+-.LP 
++.LP
  whohas is a command line tool to query package lists from the Arch, Debian, 
Fedora, Gentoo, Mandriva, openSUSE, Slackware (and linuxpackages.net), Source 
Mage, Ubuntu, FreeBSD, NetBSD, OpenBSD, Fink, MacPorts and Cygwin distributions.
-@@ -16,6 +16,9 @@
- .TP 
+ .SH "OPTIONS"
+-.LP 
+-.TP 
++.LP
++.TP
+ \fB\-\-no\-threads\fR
+ Don't use multiple threads to query package lists (will be much slower)
+-.TP 
++.TP
  \fB\-\-shallow\fR
  Limit to one call per server. Faster, but loses some information, typically 
package size and release date.
+-.TP 
 +.TP
 +\fB\-\-strict\fR
-+Return only packages whose name exactly matches \fIpkgname\fP.
- .TP 
++List only those packages that have exactly \fIpkgname\fP as their name.
++.TP
  \fB\-d Dist1[,Dist2[,Dist3 etc.]]\fR
  Queries only for packages for the listed distributions. Recognised values for 
Dist1, Dist2, etc. are "archlinux", "cygwin", "debian", "fedora", "fink", 
"freebsd", "gentoo", "mandriva", "macports", "netbsd", "openbsd", "opensuse", 
"slackware", "sourcemage", and "ubuntu".
+-.TP 
++.TP
+ \fBpkgname\fR
+ Package name to query for
+ .SH "FILES"
+ .LP
+ whohas uses various files in ~/.whohas to cache package lists for some 
distributions.
+ .SH "SEE ALSO"
+-.LP 
++.LP
+ See \fIintro.txt\fP or \fIintro.html\fP notes on using whohas.
+ .SH "AUTHORS"
+ .LP 

++++++ ubuntu-versions-510203.patch -> ubuntu-versions.patch ++++++
--- /work/SRC/openSUSE:Factory/whohas/ubuntu-versions-510203.patch      
2012-02-07 14:47:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.whohas.new/ubuntu-versions.patch        
2012-11-18 20:27:45.000000000 +0100
@@ -1,8 +1,27 @@
-Index: whohas-0.29/program/whohas
-===================================================================
---- whohas-0.29.orig/program/whohas    2012-01-15 14:33:25.223864820 -0300
-+++ whohas-0.29/program/whohas 2012-01-15 14:34:10.853958060 -0300
-@@ -51,7 +51,7 @@
+From: Yaroslav Halchenko <deb...@onerussian.com>
+Subject: Reincarnated and refactored the patch to fetch multiple suites from 
listing page for ubuntu (and Debian)
+
+original patch had header:
+    ## 06-ubuntu-versions-510203.dpatch by Jonathan Wiltshire 
<deb...@jwiltshire.org.uk>
+    ##
+    ## All lines beginning with `## DP:' are a description of the patch.
+    ## DP: Patch to show all versions of a package from Ubuntu, not just
+    ## DP: the earliest, see bug 510203.
+    ## DP: Additionally, show the repo that the package is from (eg. universe)
+    ## DP: Original patch from Steve Cotton <steve0...@s.cotton.clara.co.uk>
+    ## DP: Status: forwarded upstream to Philipp Wesche <phi1...@yahoo.com>
+
+I have not relied on it actually but redone it, this time relying more on the
+markup instead of lines counts. Also fixed stripping of additional HREFs after
+the version (e.g. to backports repo)
+
+Origin: Debian
+Bug-Debian: http://bugs.debian.org/670675
+Last-Update: 2012-09-27
+
+--- a/program/whohas
++++ b/program/whohas
+@@ -51,7 +51,7 @@ my @columns = (11,38,18,4,10,25);
  my $cols = 6;
  
  my $fedora_release             =  16                  ;
@@ -11,3 +30,46 @@
  my $opensuse_major             = "12"                 ;
  my $opensuse_minor             = "1"                  ;
  my $mandrivaVersion            = "2011.0"             ;
+@@ -964,17 +964,31 @@ sub debuntu {
+               for (my $i = 50; $i < @lines; $i++) {
+                       if ($lines[$i] =~ /<h3>Package /) {
+                               my $name = (split /h3>Package |<\/h3>/, 
$lines[$i])[1];
+-                              push @names, $name;
+-                              my @parts = split /href\=\"|\"\>|<\/a\>/, 
$lines[$i+3];
+-                              $parts[4] =~ s/ \(|\)://g;
+-                              push @groups, $parts[4];
+-                              push @repos, $dists[$x];
+-                              push @urls,  $baseurl.$parts[2];
+-                              push @dates, "";
+-                              @parts = split />|: /, $lines[$i+6];
+-                              $parts[1] =~ s/ \[\<strong.*//;
+-                              push @versions, $parts[1];
+-                              $i += 11;
++                              # There are now one or more 8-line blocks that 
are approximately
++                              # $lines[$i]   <li class="intrepid"><a 
class="resultlink" href="/intrepid/dpkg">intrepid</a> (base):
++                              # $lines[$i+3] <br>1.14.20ubuntu6: amd64 i386
++                              # And this list starts with <ul> and ends with 
</ul>
++                              $i += 1;
++                              while (($lines[$i] !~ '</ul>') && ($i < 
@lines)) {
++                                      if ($lines[$i] =~ /class="resultlink"/) 
{
++                                              push @names, $name;
++                                              my @parts = split 
/href\=\"|\"\>|<\/a\>/, $lines[$i];
++                                              $parts[4] =~ s/ \(|\)://g;
++                                              push @groups, $parts[4];
++                                              push @repos, $dists[$x];
++                                              push @urls,  $baseurl.$parts[2];
++                                              push @dates, "";
++                                              my $vline = $lines[$i+3];
++                                              # prune possibly existing link 
to backports
++                                              $vline =~ s/ *\[.*strong.*\]//g;
++                                              # Split lines e.g. 
"0.8.4-3+squeeze1: all"
++                                              @parts = split />|: /, $vline;
++                                              push @versions, $parts[1];
++                                              $i += 4; # do not be too greedy
++                                      } else {
++                                              $i += 1;
++                                      }
++                              }
+                       }
+               }
+       }

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to