astarix.co.uk

Tag: linux

How to easily exclude packages from apt-get upgrades

Once you’ve got the hang of Debian/Ubuntu’s package management system and have had a fine time smoothly upgrading your system periodically, at some point the inevitable will happen: while upgrading a package will get installed that will break something.

It could be, as happened to me recently, a version of Google Chrome that won’t play nice with some element of Gnome or the GTK toolkit – any button on a webpage that should launch a dialogue box took minutes to do so. Several minutes. So we need to reverse this, by downgrading the package to the previous version, and then prevent it from being reinstalled automatically. How?

The most common Debian package manager frontend is apt-get. There are a number of different options, from powerful but complex dpkg, it’s more user-friendly brother aptitude, to the full blown X-windows GUI of synaptic. But apt-get is most people’s first choice, the most straightforward, and the one which comes with no obvious switch or option included – the following demonstrates how.

Wine, a cruel mistress – updating Debian’s ancient wine

Wine can indeed be a cruel mistress; the morning after the night before, after the sudo apt-get install has faded away and left you nothing but a jiggered system that won’t run even notepad.

I speak of course not of the mighty grape and what she gives us, but of wine (Wine Is Not an Emulator), the Win32 translation layer for Unix/Linux that does an excellent job of allowing Windows programs to run natively on Linux, often at great speed and without problems.

And sometimes with problems. If you run Ubuntu or Fedora, you’ll be blessed with recent updates from the 1.3 beta versions of wine, while the official stable version has languished at 1.2 for what seems like an eon. If you use Debian, then apt-get will only provide you with the even more Jurassic 1.0.3 version from the current stable (squeeze) repositories.

The reasoning behind Debian’s exceptionally cautious nature and glacial pace of rolling out updates is well known and well founded, and wine is hardly a core package. But that doesn’t help in the slightest when you really, simply, absolutely have to install and run Deathspank right now.

Using Ubuntu PPA packages with Debian or Crunchbang

Ah, the joys of package management. Every linux distribution flavour has it’s own package management tool to ensure the otherwise near-impossible task of installing programs and their dependencies and updating them to the latest versions is made possible for mere mortals. Even the venerable Slackware.

Ubuntu, based on Debian, uses the same apt-get and dpkg tools. But as the pace of development at Ubuntu is much quicker and has a broader reach of users and developers than vanilla Debian, Canonical introduced PPA – personal package archives – on its Launchpad service to allow developers to create and maintain their own packages that can be accessed by Ubuntu users through apt-get, without having to bring them into the Ubuntu official release package tree itself.

While built for Ubuntu releases specifically, these packages can be used with Debian – and therefore Crunchbang – without much hassle. Two things are needed: firstly the location of the archive, usually an http:// or https:// web address; secondly the GPG encryption key that is used to sign the .deb packages, ensuring that the software you are installing on your computer with root permissions is, at least to a point, trusted.

Using #! (Crunchbang) Linux

Crunchbang is sleek, fast, minimal linux flavour based on Debian, one of the largest families in the linux ecosystem. It uses the X-Window system and Openbox window manager, with a lightweight underpinning of GTK+2.0 but without the full Gnome desktop environment, making it considerably more snappy to boot and use than full-bodied distributions such as Ubuntu or Fedora.

I’ve been using it for a month or two and liked it enough to decide to rebuild my Samsung Q320 laptop, around it. I’m going to cover a few of the tweaks I applied, problems I tackled, additions or subtractions I made – just in case they’re of interest to you, the reader, but mainly so that they’re written down for me when I come to repeat this process at some point in the future.