File strictness-510020-510524.patch of Package whohas

--- 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".