Never ever trust Ubuntu

Was using an ubuntu virtual machine. Issued "ack" It said to install it using "sudo apt-get install ack". I did it. It didn't install App::Ack :( it is some other stupid tool. So, "sudo apt-get remove ack" followed by "sudo cpan App::Ack".

8 Comments

I think they keep it under the "ack-grep" package.

It's not Ubuntu's fault, nor is it that of Debian (where the package actually originated from). The Debian/Ubuntu package 'ack' predates the awesome 'ack' tool that we all want. So, they had to choose a different name. Hence ack-grep.

From ack homepage:

To install ack-grep as "ack" instead of "ack-grep", use this command:
    sudo dpkg-divert --local --divert /usr/bin/ack --rename \
        --add /usr/bin/ack-grep

Also, it's always a good idea to run apt-cache show package-name, before installing something.

The package name ack was already taken by ACK, a Kanji code converter that predates ack, so the Debian package maintainers chose ack-grep instead and Ubuntu followed, as they do by default. Although ack-grep has more users than ack, it did come second. Of the Debian Popularity Contest participants, 1330 installed ack-grep and 401 use it, while only 155 installed ack and 13 use it. ack-perl would have been a better name though, or even the dreaded libapp-ack-perl. The name ack-grep is sort of like using gimp-photoshop if gimp was unavailable. A mention of the conflict in the ack package description would also be nice.

Same thing with Git. The "git" package came before the git we all know, so you need to install "git-core" or "git-arch".

Shit happens.

When the guy on the Debian project was packaging ack, I implored him to not call it ack-perl, because it doesn't matter that ack is in Perl. The implementation language is irrelevant, and I didn't want any unnecessary bias against Perl. We don't call it grep-c or mailman-python, do we?

That people who hate Perl use ack is a triumph.

petdance: great point.

It's possible for a newer but more popular package to "win" after a couple of deprecation cycles.

Since 2009, installing "git" will get you the git VCS, and installing "gnuit" will get you what used to be in the "git" package — but it took a dance in which for one entire release cycle, "git" was a dummy package that depended on "gnuit" so that everyone who wanted gnuit would get it installed under the new package name. Then "git" was free to be taken over by git, and "git-core" became a dummy package in a similar manner.

Leave a comment

About Alberto Simões

user-pic I blog about Perl. D'uh!