Hello community, here is the log from the commit of package whohas for openSUSE:Factory checked in at 2012-02-07 14:47:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2011-09-23 12:50:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.whohas.new/whohas.changes 2012-02-07 14:47:05.000000000 +0100 @@ -1,0 +2,60 @@ +Sat Feb 4 13:49:53 UTC 2012 - asterios.dra...@gmail.com + +- Rebased ubuntu-versions-510203.patch to apply cleanly. +- Removed opkg-repo.patch (repository doesn't respond). +- Readded openbsd-cache-results-557724.patch (problem not fixed upstream). +- Added fedora-search-619873.patch (taken from Debian) to support Fedora's + package listing. +- Fix compilation in SLE (don't use make_install macro). + +------------------------------------------------------------------- +Sun Dec 4 20:18:53 UTC 2011 - asterios.dra...@gmail.com + +- Update to version 0.29: + * fixed AUR module + * fixed Mandriva module + * fixed a problem with openBSD URL construction + * added new Slackware module to replace the previous one which queried a + now-defunct (third party) web interface + * code cleanup + * implemented functionality suggested by Guillaume Delacour and Steve Cotton + * updated to current version numbers of Ubuntu, Mandriva, openSUSE, OpenBSD, + Fedora, Slackware (13.1 not 13.37 as we're waiting on linuxpackages.net to + update their search interface) +- Rebased the following patches to apply cleanly: + * manpage-0.24.patch. + * debian-versions-511364.patch. + * help-param-513476.patch. + * strictness-510020-510524.patch. + * improve-fetchdoc.patch. + * opensuse-searchpath-585596.patch. +- Marked the following patches as PATCH-NEEDS-REBASE (not critical): + * ubuntu-versions-510203.patch. + * opkg-repo.patch. +- Removed the following patches: + * use-getopt-513473.patch (merged upstream). + * openbsd-cache-results.patch (fixed upstream). + * fedora-version.patch (fixed upstream). + * openbsd-url-586537.patch (fixed upstream). +- Spec file updates: + * Changes based on spec-cleaner run. + * Changed License: to GPL-2.0+ (SPDX style). + +------------------------------------------------------------------- +Wed Aug 24 14:48:11 UTC 2011 - sascha.ma...@open-slx.de + +- fixed build + +------------------------------------------------------------------- +Sun Jul 24 20:30:51 UTC 2011 - asterios.dra...@gmail.com + +- Spec file updates: + * Removed find and perl-DateTime from Requires: (not needed). + * Added perl-XML-Simple in Requires:. + * Minor other updates. +- Added some patches (taken from Debian) that fix/improve various issues with + the package and add support for more recent distributions. +- Removed whohas-opensuse-fix.patch and replaced it with the Debian patch which + also shows the version number of a package. + +------------------------------------------------------------------- Old: ---- whohas-0.24.tar.bz2 whohas-opensuse-fix.patch New: ---- archlinux-url-561536.patch debian-versions-511364.patch dont-mask-vars-560891.patch fedora-search-619873 gentoo-result-url-516071.patch help-param-513476.patch improve-fetchdoc.patch manpage-0.23.patch manpage-0.24.patch openbsd-cache-results-557724 opensuse-searchpath-585596.patch strictness-510020-510524.patch ubuntu-versions-510203.patch whohas-0.29.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ whohas.spec ++++++ --- /var/tmp/diff_new_pack.Ko70n3/_old 2012-02-07 14:47:07.000000000 +0100 +++ /var/tmp/diff_new_pack.Ko70n3/_new 2012-02-07 14:47:07.000000000 +0100 @@ -1,8 +1,9 @@ # # spec file for package whohas # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2010 Sascha Manns <saigk...@opensuse.org> +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 8/2011 open-slx GmbH <sascha.ma...@open-slx.de> +# Copyright (c) 2010 - 7/2011 Sascha Manns <saigk...@opensuse.org> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,46 +17,80 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: whohas -Version: 0.24 -Release: 1 -License: GPLv2 or later +Version: 0.29 +Release: 0 Summary: Package list querying tool -Url: http://www.philippwesche.org/200811/whohas/intro.html +License: GPL-2.0+ Group: System/Console -Source: %{name}-%{version}.tar.bz2 -# PATCH-FIX-UPSTREAM -- saigk...@opensuse.org Fixed some minor things like the search URL of openSUSE Server -Patch0: whohas-opensuse-fix.patch -# PATCH-FIX-OPENSUSE -- p...@suse.de - Added a Makefile for Installation. -Patch1: whohas-fix_install.patch -Requires: find +Url: http://www.philippwesche.org/200811/whohas/intro.html +Source0: http://www.philippwesche.org/200811/%{name}/%{name}-%{version}.tar.gz +# PATCH-FIX-OPENSUSE whohas-fix_install.patch p...@suse.de -- Added a Makefile for Installation. +Patch0: whohas-fix_install.patch +# PATCH-FIX-UPSTREAM manpage-0.23.patch asterios.dra...@gmail.com -- Add the --shallow option to the syntax line in the manpage +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 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 +Patch6: strictness-510020-510524.patch +# PATCH-FIX-OPENSUSE gentoo-result-url-516071.patch deb#516071 asterios.dra...@gmail.com -- Return a more official link to the gentoo package, where more useful information can be found +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 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 Requires: perl = %{perl_version} -Requires: perl-DateTime +Requires: perl-XML-Simple Requires: perl-libwww-perl BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description -whohas is a command line tool that allows querying several package lists at once - currently -supported are Arch, Debian, Fedora, Gentoo, Mandriva, openSUSE, Slackware (and linuxpackages.net), -Source Mage, Ubuntu, FreeBSD, NetBSD, OpenBSD, Fink, MacPorts and Cygwin. whohas is written in -Perl and was designed to help package maintainers find ebuilds, pkgbuilds and similar package -definitions from other distributions to learn from. However, it can also be used by normal -users who want to know: +whohas is a command line tool that allows querying several package lists at +once - currently supported are Arch, Debian, Fedora, Gentoo, Mandriva, +openSUSE, Slackware (and linuxpackages.net), Source Mage, Ubuntu, FreeBSD, +NetBSD, OpenBSD, Fink, MacPorts, Cygwin and OpenMoko. whohas is written in Perl +and was designed to help package maintainers find ebuilds, pkgbuilds and +similar package definitions from other distributions to learn from. However, it +can also be used by normal users who want to know: * Which distribution provides packages on which the user depends. - * What version of a given package is in use in each distribution, or in each release of a - distribution (implemented only for Debian). + * What version of a given package is in use in each distribution, or in each + release of a distribution (not implemented for all distributions). %prep %setup -q -%patch0 -p1 -%patch1 +%patch0 +%patch1 -p1 +%patch2 +%patch3 -p1 +%patch4 +%patch5 +%patch6 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 +%patch12 -p1 +%patch13 -p1 -%__chmod go+rx html_assets -%__chmod -R 644 Changelog INSTALL LICENSE intro.html intro.txt html_assets/* +chmod go+rx html_assets +chmod -R 644 Changelog LICENSE intro.html intro.txt html_assets/* %build @@ -63,17 +98,14 @@ # install binary # INFO: From line 52 on you will find the searchable repositories. If you would like to # change them, just edit these lines. -%makeinstall - -%clean -%__rm -rf %{buildroot} +make DESTDIR=%{buildroot} install %files +%defattr(-,root,root,-) +%doc Changelog LICENSE intro.html intro.txt html_assets/ %attr(0755,root,root) %{_bindir}/%{name} -%defattr(-,root,root) -%dir %{_mandir}/de/man1 -%{_mandir}/man1/%{name}.1.gz -%{_mandir}/de/man1/%{name}.1.gz -%doc Changelog INSTALL LICENSE intro.html intro.txt html_assets/ +%doc %{_mandir}/man1/%{name}.1%{ext_man} +%doc %dir %{_mandir}/de/man1 +%doc %{_mandir}/de/man1/%{name}.1%{ext_man} %changelog ++++++ archlinux-url-561536.patch ++++++ Description: update search URL for Arch repositories Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561536 Author: Guillaume Delacour <g...@iroqwa.org> 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 @@ 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] =~ /\<tr class\=\"pkgr/) { + if ($lines[$i] =~ /\<tr class\=\"odd/) { for (my $a = 2; $a < 11;$a++) { my $temp = $lines[$a+$i]; $temp =~ s/.*\<td\>|\<\/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 style=\".*\">|<\/span>//g; + } elsif ($a == 7) { + $temp =~ s/<span class=\".*\">|<\/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/.*\<a href=\"|\">.*//g; + $temp =~ s/.*\<a href=\"|\".*//g; return $temp; } ++++++ debian-versions-511364.patch ++++++ --- 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 @@ } sub debian { - my @dists = ( 'stable', 'testing' ); + my @dists = ( 'stable', 'testing', 'unstable', 'experimental' ); &debuntu('http://packages.debian.org','Debian',\@dists,$_[0]); return(); } ++++++ dont-mask-vars-560891.patch ++++++ Description: Remove a double-declaration of @dates Author: Jonathan Wiltshire <deb...@jwiltshire.org.uk> Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560891 Forwarded: phi1...@yahoo.com --- program/whohas | 1 - 1 file changed, 1 deletion(-) --- whohas-0.23.orig/program/whohas +++ whohas-0.23/program/whohas @@ -1085,7 +1085,6 @@ my @dates; my @urls; my @sizes; - my @dates; my $indicator = 0; for (my $i = 100; $i < @lines; $i++) { # 100 is a compromise between safety and efficiency if ($lines[$i] =~ /<td class='data/) { ++++++ fedora-search-619873 ++++++ ## Description: Support fedora's package listing ## Origin/Author: m...@debian.org ## Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619873 Index: whohas-0.24/program/whohas =================================================================== --- whohas-0.24.orig/program/whohas 2011-11-29 16:22:29.000000000 -0300 +++ whohas-0.24/program/whohas 2011-11-29 16:25:47.192778437 -0300 @@ -290,27 +290,26 @@ 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 ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 35-gentoo-result-url-516071.dpatch by Jonathan Wiltshire <deb...@jwiltshire.org.uk> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Return a more official link to the gentoo package, where more useful ## DP: information can be found @DPATCH@ --- whohas-0.23.orig/program/whohas +++ whohas-0.23/program/whohas @@ -800,6 +800,7 @@ sub gentoo { my $gentoobase = "http://gentoo-portage.com"; + my $gentoobaseofficial = "http://packages.gentoo.org/package"; my $distroname = "Gentoo"; my @names; my @versions; @@ -821,6 +822,7 @@ my @dosparts = split /\//, $parts[1]; $dosparts[1] =~ / +$/; my $tempurl = $gentoobase."/".$dosparts[0]."/".$dosparts[1]; + my $officialurl = $gentoobaseofficial."/".$dosparts[0]."/".$dosparts[1]; 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 @@ } push @names, $dosparts[1]; push @groups, $dosparts[0]; - push @urls, $tempurl; + push @urls, $officialurl; push @versions, $vernum; push @repos, ""; push @sizes, ""; ++++++ help-param-513476.patch ++++++ --- 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 @@ 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 ); +if ($option_help) { + print "Usage: $0 [--no-threads] [--shallow] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n"; + exit 0; +} + if (@ARGV > 1) { die "Error:\tToo many parameters. Usage: $0 [--no-threads] [--shallow] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n"; } elsif (@ARGV < 1) { ++++++ improve-fetchdoc.patch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 40-improve-fetchdoc.dpatch by Jonathan Wiltshire <deb...@jwiltshire.org.uk> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Shift some of the burden in sub fetchdoc onto the LWP::UserAgent class ## 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/\&\;/\&/ig; # convert & to & + $url =~ s/\&\;/\&/ig; # convert & to & my $ua = LWP::UserAgent->new; $ua->env_proxy; - my @firstline; - my @response; - for (my $count = 0; ; ++$count) { # termination condition inside loop - my $req = HTTP::Request->new(GET => $url); - my $res = $ua->request($req)->as_string; - @response = split (/\n/, $res); - @firstline = split (/ /, $response[0]); - my $restest = 0; - if (@firstline == 3) { - $restest = $firstline[1]; - } elsif (@firstline > 3) { - $restest = $firstline[0]; - } - if ($restest == 200 || $response[0] =~ /200 OK/) { #NB the matching expression added specifically for NetBSD package page! - # server response 200 is a stringent criterion, but should work - last; - } elsif ($count > 4) { # loop termination condition - unless ($silent == 1) { - print ("Tried fetching \"$url\" five times. Giving up.\n"); - } - return (); - last; + + my $response = $ua->get($url); + if($response->is_success) { + return $response->decoded_content; + } else { + unless ($silent == 1) + { + print("Couldn't fetch \"$url\". Giving up.\n"); } + return(); } - my $end = @response - 1; - my $finaldoc = join ("\n", @response[14..$end]); - return ($finaldoc); } sub pretty_print { ++++++ manpage-0.23.patch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 05-manpage-0.23.dpatch by Jonathan Wiltshire <deb...@jwiltshire.org.uk> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Add the --shallow option to the syntax line in the manpage ## DP: Status: Sent upstream to phi1...@yahoo.com @DPATCH@ --- whohas-0.23.orig/usr/share/man/man1/whohas.1 +++ whohas-0.23/usr/share/man/man1/whohas.1 @@ -4,7 +4,7 @@ whohas \- find packages in various distributions' repositories .SH "SYNTAX" .LP -whohas [\fI\-\-no\-threads\fP] [\fI\-d Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP +whohas [\fI\-\-no\-threads\fP] [\fI\-\-shallow\fP] [\fI\-d Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP .SH "DESCRIPTION" .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. ++++++ manpage-0.24.patch ++++++ --- 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 @@ -1,4 +1,4 @@ -.TH "whohas" "1" "0.23" "Jonathan Wiltshire" "" +.TH "whohas" "1" "0.29" "Jonathan Wiltshire" "" .SH "NAME" .LP whohas \- find packages in various distributions' repositories ++++++ openbsd-cache-results-557724 ++++++ 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> --- whohas-0.23.orig/program/whohas +++ whohas-0.23/program/whohas @@ -789,7 +789,7 @@ 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 ++++++ --- 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++) { - 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 @@ } } 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, ''; } - 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++; } ++++++ strictness-510020-510524.patch ++++++ --- 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 @@ 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 ); if ($option_help) { - print "Usage: $0 [--no-threads] [--shallow] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n"; + print "Usage: $0 [--no-threads] [--shallow] [--strict] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n"; exit 0; } if (@ARGV > 1) { - die "Error:\tToo many parameters. Usage: $0 [--no-threads] [--shallow] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n"; + die "Error:\tToo many parameters. Usage: $0 [--no-threads] [--shallow] [--strict] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n"; } elsif (@ARGV < 1) { die "Error:\tPlease specify a search term.\n"; } @@ -1157,6 +1159,10 @@ } sub pretty_print { + 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 @@ 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 + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} + 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 @@ whohas \- find packages in various distributions' repositories .SH "SYNTAX" .LP -whohas [\fI\-\-no\-threads\fP] [\fI\-\-shallow\fP] [\fI\-d Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP +whohas [\fI\-\-no\-threads\fP] [\fI\-\-shallow\fP] [\fI\-\-strict\fP] [\fI\-d Dist1[,Dist2[,Dist3 etc.]]\fP] \fIpkgname\fP .SH "DESCRIPTION" .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 \fB\-\-shallow\fR Limit to one call per server. Faster, but loses some information, typically package size and release date. +.TP +\fB\-\-strict\fR +Return only packages whose name exactly matches \fIpkgname\fP. .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". ++++++ ubuntu-versions-510203.patch ++++++ 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 @@ my $cols = 6; my $fedora_release = 16 ; -my $ubuntu_current_release = "oneiric" ; +my $ubuntu_current_release = "all" ; my $opensuse_major = "12" ; my $opensuse_minor = "1" ; my $mandrivaVersion = "2011.0" ; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org