Utilizing debtags to Discover Similar Software
Problem: you're running your favorite application when you realize that there's a feature you want that is not yet implemented. You could write this feature yourself, but perhaps there is a similar application that has already implemented it for you.
Solution: someone tells you to check out debtags, a feature of Debian-derived distributions that allows users to discover similar software packages based on the tags associated with a myriad of DEB packages. Let's utilize debtags to find an alternative for our favorite command line MP3 player, mpg123.
First, we must update the debtags database.
$ sudo debtags update
Then, we can start searching!
$ debtags related mpg123 -d 1 madplay - MPEG audio player in fixed point mpg321 - mpg123 clone that doesn't use floating point
From the output, you can see that there appears to be a suitable alternative called mpg321. How nice! The '-d' option specifies the relevancy of the results. The default is 0, but the higher the value, the less relevant your results will be. Keep this in mind as you run your queries. The best solution I have found is to start at 0 and work your way up until your query returns some results. A value of 1 will not suffice for all package searches — we could whip up a script, but then again, I'm too lazy.
It's also possible to see the tags associated with an application.
Let's take a look at what types of tags are assigned to mpg123 that helped debtags find related software.
$ debtags tag ls mpg123 interface::commandline role::program sound::player use::playing works-with::audio works-with-format::mp3
Now, related software substitutes should have similar tags, right?
$ debtags tag ls mpg321 interface::commandline role::program scope::utility sound::player use::playing works-with::audio works-with-format::mp3
This is exactly how debtags works with the '-d' option. The relevancy is determined based on the frequency of tag matches across possible alternative applications. We can also just search for software based on certain tags. Let's expand our mind and see all the sound players available:
$ debtags search sound::player adplay - console-based OPL2 audio player akode - (short description not available) allegro-examples - example programs and demo tools for the Allegro library alsaplayer - (short description not available) alsaplayer-alsa - PCM player designed for ALSA (ALSA output module) alsaplayer-common - PCM player designed for ALSA (common files) alsaplayer-daemon - PCM player designed for ALSA (non-interactive version) ...[snipped]...
To veiw all of the possible tags that we can search for:
$ debtags tagcat Facet: accessibility Description: Accessibility Support Accessibility Support Tag: accessibility::TODO Description: Need an extra tag Need an extra tag ...[snipped]...
To dump the entire package-to-tag database mappings:
$ debtags cat 2vcard: implemented-in::perl, role::program, use::converting 3dchess: game::board, game::board:chess, implemented-in::c, ... 3ddesktop: game::toys, interface::3d, role::program, ... 44bsd-rdist: admin::file-distribution, interface::commandline, ... 4g8: admin::monitoring, protocol::ip, protocol::tcp, ... 6tunnel: interface::daemon, network::server, network::vpn, ... 855resolution: admin::configuring, hardware::video, ... ...[snipped]...
I encourage you to read over the man page for even more advanced debtags kung-fu. There are even options to add your own custom tags and even submit tags for packages that have incorrect or outdated information. debtags is a wonderful utility, so have fun with it! Post your comments below if you have further questions or tips :-)
Kristian Erik Hermansen is a Linux Journal Reader Advisory Panelist. Track Me.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- RSS Feeds
- Introduction to MapReduce with Hadoop on Linux
- UX Designer
- Bought photoshop CS5 for developing a website :(
46 min 3 sec ago - What the author describes
2 hours 12 min ago - Reply to comment | Linux Journal
6 hours 22 min ago - Reply to comment | Linux Journal
7 hours 7 min ago - Didn't read
7 hours 18 min ago - Reply to comment | Linux Journal
7 hours 23 min ago - Poul-Henning Kamp: welcome to
9 hours 33 min ago - This has already been done
9 hours 34 min ago - Reply to comment | Linux Journal
10 hours 19 min ago - Welcome to 1998
11 hours 7 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
learn something everyday!
Very nice, I never knew about debtags. Thanks!
install it first
I probably should have mentioned that debtags is not installed by default. That should actually be your first step :-)
$ sudo aptitude install debtags
Kristian Erik Hermansen is a Linux Journal Reader Advisory Panelist. Track Me.