Archive for March, 2013

Fun with sqlite/fts

March 27, 2013

A while ago I played with sqlite. Its pretty awesome. When using the full text search (fts) extension it also provides super fast full text searching. One of the things I was missing (compared to other engines) is the similar text suggestion (“Did you mean?”) support. Fortunately this is relatively easy to add via the fts4aux virtual table that sqlite supports.

I pushed a full example of to https://github.com/mvo5/sqlite-fts-did-you-mean. The way it works is that you build a set of similar words and use that to query for the “term” value from the fts4aux table.

Here is the output from the example:

$ ./fts_did_you_mean.py aptx
Did you mean:
 apex (rank: 2)
 apt (rank: 1)
time 0.024138927459716797

Using gdebi to install build-dependencies

March 22, 2013

I wrote gdebi a long time ago to make it really easy to install .deb package with proper dependency resolution from the commandline and via a gtk (and kde) UI. But another neat (but not very well known) feature of the gdebi-core cli tool is to install the build-dependencies of a debian source package. If you run:

$ gdebi debian/control

in a unpacked debian source package it will check for missing build-dependencies and offer to install them.

New unattended-upgrades for debian/experimental

March 16, 2013

There is a new 0.80~exp2 version of unattended-upgrades available. This would normally be fine for debian/sid but because of the freeze I decided to put it into experimental. Some nice features like adding a “–verbose” mode that shows the actual dpkg output when
running and codename based matching plus some nice fixes from Brian Murray (thanks!).

The codename based matching is interessting as it allows writing a matcher like “n=wheezy” (or more verbose “codename=wheezy”) in the config file. You can use “apt-cache policy” (without further arguments) to see what origins are available.

Enjoy and let me know if you find any issues issues!