JP Vossen on 22 Mar 2011 12:15:49 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Linux and package managers/repos

Last night at PLUG W we briefly discussed package managers, and how Gentoo, RPM and APT systems work. A longer discussion here is out of my scope at the moment, but I wanted to provide a concrete example of something I was talking about, that I think is very important, but that doesn't get the press it deserves.

Well, it actually does get a lot of press, but under a different name and in a different context. The one that gets press is called an "app store," but Linux has had that since Debian (at least, possibly longer?) except it's called a "repository" and it's full of free (as in no cost and freedom) software.

There are 2 main reasons why this matters:
1) updates
2) ease-of-use, which encompasses: ease of discovery, compatibility, user experience, ease of removal, and so forth.

I'll contrast against Windows, but I'm pretty sure that Mac is about the same as Windows here (that'll change sooner or later with a "Mac Store" if it hasn't already).

To update Windows you use WindowsUpdate, which was tacked on at the 11th hour because no one updated anything and thus left gaping holes everywhere. And it only updates the core OS and a few selected Microsoft apps (Office). There are various (expensive) third-party solutions that do better and some apps will update themselves, thus leading to many and conflicting auto-updaters, and different, semi-uncontrollable schedules. Ugly, ugly, ugly.

On the other hand, since not too long after the dawn of Linux, this has been baked in to the very core of what a "distribution" is. And as long as you stay inside the package manager, 'sudo aptitude update && sudo aptitude full-upgrade' updates *everything* on the system...bang...done. (Or 'yum upgrade' for Red Hat-ish or 'emerge world' (Rich, right?) for Gentoo.)

So what does "stay inside the package manager" mean? It means that you don't install stuff from source (except Gentoo, but that *is* the package manager :), you install from the repo. OK, but what if you need "foo?" Don't worry, it's in there. (My example last night for reading MRI results was "aeskulap - medical image viewer and DICOM network client".)

So, todays example. I got an email at work discussion a non-intuitive customer name issue, and I thought I'd be funny and try to do an anagram of it. But the name was 19 characters, which is too long for the web-based anagram engines. So in literally 10 minutes (read the timestamps) I:
	1) Searched for apps to solve my problem
	2) installed one, took a few minutes to realize didn't like it
	3) installed the other, took a few minutes to use it
	4) purged the one I didn't like, and am sure it's really gone

How long would a search for a similar tool take for Windows? You have to Google it, read various descriptions scattered all over the web, choose from possibly hundreds of analysis-paralysis-inducing choices, download it, hope it's not malware, figure out how to install it, try it, then figure out if it will cleanly uninstall (probably not). Not for me...

* I prefer the command line. There are various GUI tools that do all of this too. The names change based on distro and version of distro. Poke around... * I also wrote a tool to help me remember how to do some things. It's called 'deb' but it shows the real command it used.

Start: 14:32:32
Stop:  14:42:42

/home/jp$ deb search anagram
apt-cache search anagram | sort | /usr/bin/less --quit-if-one-screen --no-init
      1 an - very fast anagram generator
      2 anagramarama - fast paced anagram puzzle game using SDL
3 anagramarama-data - fast paced anagram puzzle game using SDL (data files)
      4 kanagram - jumble word puzzle for KDE 4
      5 kdeedu-kvtml-data - kvtml files for kdeedu programs
      6 wordplay - anagram generator

/home/jp$ deb show an wordplay
apt-cache show an wordplay | /usr/bin/less --quit-if-one-screen --no-init
      1 Package: an
      2 Priority: optional
      3 Section: universe/games
      4 Installed-Size: 88
5 Maintainer: Ubuntu Developers <>
      6 Original-Maintainer: Paul Martin <>
      7 Architecture: amd64
      8 Version: 0.95-3.2
      9 Depends: libc6 (>= 2.4)
     10 Recommends: wbritish | wordlist
     11 Filename: pool/universe/a/an/an_0.95-3.2_amd64.deb
     12 Size: 15366
     13 MD5sum: 9149bb5c5e836a002c4f0eaef71fd747
     14 SHA1: e7b22754f20913e6654ddb4a3613fcb6a113920b
15 SHA256: a726e120ef29a983059bc2c561708aad97c5b80ed645d459884fccc1dcc099a3
     16 Description: very fast anagram generator
17 Generates anagrams for a phrase supplied by the user, the words used in the 18 anagram are taken from a specified dictionary which should contain one word 19 per line (default:/usr/share/dict/words). Appears to be up to 10 times
     20  faster than wordplay, especially for longer phrases.
     21 Bugs:
     22 Origin: Ubuntu
     24 Package: wordplay
     25 Priority: optional
     26 Section: universe/games
     27 Installed-Size: 296
     28 Maintainer: Pawel Wiecek <>
     29 Architecture: amd64
     30 Version: 7.22-17
     31 Depends: libc6 (>= 2.3.4-1)
     32 Filename: pool/universe/w/wordplay/wordplay_7.22-17_amd64.deb
     33 Size: 106750
     34 MD5sum: 8ba33dadc8fbf580ff4d20db3c0b707b
     35 SHA1: 6c2737731411d1f4920e6ca53e9b1d13dd9522b9
36 SHA256: 84c59374f3dc90929a9d1ee1fc56361635cc2d7b6c98bf26c57333d72e22701a
     37 Description: anagram generator
     38  Wordplay generates anagrams of words or phrases. For example,
     39  "Debian GNU/Linux" = "laud benign unix", "nubian lug index",
     40  "dang nubile unix", or "I debug in lax nun".
     41 Bugs:
     42 Origin: Ubuntu

/home/jp$ sudo aptitude install an

/home/jp$ an 'Some long name here' | less

/home/jp$ sudo aptitude install wordplay

/home/jp$ wordplay 'Some long name here' | less
<1,124,644 anagrams...not as funny as I thought, but I'll keep this app>

/home/jp$ sudo aptitude purge an

JP Vossen, CISSP            |:::======|
My Account, My Opinions     |=========|
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --