# whohas

### Description

whohas is a command line tool that allows querying several package lists at once - currently supported are Arch, Debian, Fedora, Gentoo, Mageia, Mandriva, openSUSE, Slackware, 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:

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

### News

There is now a "--no-threads" switch for those that need to suppress threading (not recommended, will be very slow).

### Tutorial

It is suggested you use Unix command line tools to enhance your search results. whohas is optimised for fast execution. This is done by threading, and the order of results cannot be guaranteed. To nonetheless get a standardised output, alphabetically sorted by distribution, use the sort tool:

whohas gimp | sort

You can use grep to improve your search results. Depending on whether you want only packages whose names begin with your search term, end with your search term, or exactly match, you would use a space before, after or on both sides of your search term, respectively:

whohas gimp | sort | grep " gimp"

whohas vim | sort | grep "vim "

whohas gimp | sort | grep " gimp "

The spaces will ensure that only results for the package gimp are displayed, not for gimp-print etc.

If you want results for a particular distribution only, do

whohas arch | grep "^Arch"

Output for each module will still be ordered, so you don't need to sort results in this case, although you may wish to do so for some distributions. Distribution names are abbreviated as "Arch", "Debian", "Fedora", "Gentoo", "Mageia", "Mandriva", "openSUSE", "Slackware", "Source Mage", "FreeBSD", "NetBSD", "OpenBSD", "Fink", "MacPorts", and "Cygwin".

Output in version 0.1 looked like this. The first column is the name of the distribution, the second the name of the package, the third the version number, then the date, repository name and a url linking to more information about the package. Future versions will have package size information, too. Column lengths are fixed, so you can use cut:

whohas vim | grep " vim " | cut -b 38-47

The first bytes of the data fields at the time of writing are 0, 11, 49, 67, 71, 81 and 106.

Here is an example of whohas 0.1 in a terminal session, showing how it works with grep and cut.

### Features and limitations

Debian refers to the binary distribution. Slackware queries Current only - Slackware package search is currently offline and undergoing redesign, therefore I disabled the module until I know more. Binary sizes for Fedora are package sizes - space needed on disk will be greater by about factor 2. Binary sizes for Debian are unpacked sizes. All details (including availability, version numbers and binary sizes) are for the x86 architecture.

Debian version numbers in rare cases may not be for x86 (will be fixed). Gentoo version availability may not be for x86 (will be fixed). I recommend you consult the URLs provided in the output, which give detailed and accurate information about each package.

You may want to use a terminal that recognises hyperlinks and allows easy access through the browser, such as gnome-terminal.

For Fedora, only release 12 is enabled by default, and only the most up to date package will be listed if different versions are available.

For openSUSE, repository designations are abbreviated for screen space reasons: the tilde symbol, ~, replaces "home", and any trailing string that simply points to the current release is truncated. Nonetheless, some of openSUSE's repository paths remain too long to be shown in full.

### Appeal

I would like to encourage distributors at this time to provide web query interfaces to package lists, and specifically provide the following information: package name, version, date, size and a url to further information (maintainer, build information etc.)

### Changelog

Link

### Dependencies

- date utility
- Perl
- LWP::UserAgent (usually packaged as perl-libwww or libwww-perl)

Currently, the local repositories created in the user's home directory take up 900K.

### Whohas.app

Whohas packaged for Mac OS X. Simply put it in your application directory (it will not work anywhere else).

Whohas.app-0.21.dmg (not updated to latest version yet)

### Third party tools

Christoph Schneeberger has set up a web-based interface here, the Python code for which can be found here under a license that requires copyright notices to be maintained.

Joost van Baal has produced an html converter for whohas results, found here and examples of input and output files here.

### Bug reports, patches and new modules

Send them along to phi1ipp@yahoo.com. Patches are more welcome if they're short (is less than 30 lines asking too much?). At this stage, I'm probably not going to write additional modules myself. But if you want your distribution or repository to be included, your chances of getting someone to write a module for you are greatly increased by providing a package list file or query interface. You should aim to include: package name, version, date, size and a url to further information (maintainer, build information etc.)

### Acknowledgements

Thanks to Andrew "ruskie" Levstik for suggesting the Source Mage module and providing a small package list file on their server for whohas to parse.

Thanks to Ladislav Bodnar of Distrowatch for advice on version checking, and his list of seminal Linux packages and stable version numbers.

Thanks to Asari Takashi, Ladislav Hagara, Enrico Tröger, Steve Cotton, Evgeni Golov, Giuseppe Iuculano, Cristian Ionescu-Idbohrn, Sylvestre Ledru, Rain_maker, Denis Silakov and James McCoy for sending patches or pull requests. Thanks to Jonathan Wiltshire for the original manpage, and forwarding Debian bug reports. If I've forgotten to mention anyone, please let me know.

Also thanks to all package maintainers.

### History

whohas started life as whichdistro.pl, but its author preferred the shorter, hopefully more memorable name which is more conducive to word play.

updated 13 July 2022