Wednesday, November 12, 2008

"phrase from nearest book" meme

From Agile Testing

The meme:
  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.
I am about to make a parody of myself, but this is honest to god page 56 sentence 5 of the closest book to me (apart from a pamphlet on health insurance which was not 56 pages long).

"Magical weapons and other spells (such as lightning bolt) inflict normal damage on him."

Yes, I am reading from the D&D Rules Cyclopedia, a collection of all the Red box/Blue box D&D rules, published 1991.

Sunday, November 09, 2008

Update to dpkg-origins installed package lister

Fixed a serious bug with dpkg-origins (see this post about dpkg-origins).  I forgot to have it check for status 'rc' packages.  These are packages that were installed and then removed.

It now handles them correctly.  (That's what I get for testing on a brand-spanking-new installation of Ubuntu.)

I've also put a version string into it: 0.9, because I'm actually using it myself in my backup plan now, which makes it near production ready!  Go get the dpkg-origins script.

Tuesday, November 04, 2008

U.S. Citizens: Go Make History

Also, can I just say I'm really glad my polling place still uses black felt-tip pens and an optical scanner?  I trust these things way more.  No hanging chads, very nice paper trail.

That is all.

Sunday, November 02, 2008

Ubuntu backup tip: save your package selections, including third-party, for later recovery

Today I wrote a little Python script which will pull a list of all of your installed packages, and then group them by Canonical-supplied, third-party PPA supplied, and manually installed .deb files.  This makes it a snap to automatically restore your package list if your system takes a dump, and even quickly put back your PPAs and manual debs as you go.

It requires python-twisted and python-apt installed.  Here is the script: dpkg-origins.

Recommended usage: Add this command to a script inside /etc/cron.daily:
  dpkg-origins | mail -s "Package selections for `hostname -s` as of `date`"

When calamity strikes and you need to restore, you can pipe this file directly:

  cat selections.txt | sudo dpkg --set-selections && apt-get -u dselect-upgrade

This will begin installing all of the Canonical-supplied packages in selections.txt.  All other packages are commented out, but the file itself contains instructions for restoring your PPA's; then you uncomment some more packages and run the above again.  Finally, at the very top of the file, you will find a commented-out list of the packages (and versions) which were installed directly from a .deb file; manually download and install those.