So I upgraded to the latest Ubuntu Lucid Lynx 10.04 the other day and to my horror it removed Python 2.4 and Python 2.5. I rely more on those programs than I do on some silly Facebook connecting social widget crap. On my laptop I have lots of Zopes requiring Python 2.4 and I have about 10 active Django projects that rely on Python2.5. This fuckup by Ubuntu caused me to write this complaint.

So my estimeed colleague and Linux wiz Jan Kokoska helped me set things straight by showing me how to downgrade these packages to Karmic version and how to pin them in the apt preferences. First of all, make your /etc/apt/source.list look like this:


deb http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted universe multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse

If you know what you're doing you might have other additional sources in there then keep those as is. Next thing to do is to update and upgrade:


# apt-get update
# apt-get dist-upgrade

You should now see that it's intending to upgrade a bunch of juicy packages like python2.4-dev for example. To check that python2.4 is now getting in from Karmic run this:


$ apt-cache madison python2.4

Now for the trick that really makes the difference:


# apt-get install python2.4=2.4.6-1ubuntu3.2.9.10.1 python2.4-dbg=2.4.6-1ubuntu3.2.9.10.1 \
python2.4-dev=2.4.6-1ubuntu3.2.9.10.1 python2.4-doc=2.4.6-1ubuntu3.2.9.10.1 \
python2.4-minimal=2.4.6-1ubuntu3.2.9.10.1

The command is quite self-explanatory. You use the equal sign to basically say what version you want to install. If you now for example want to install something like python-profiler for your Python 2.4 since this isn't available as a PyPi package. First, find out what version you have to install:


$ apt-cache madison python-profiler | grep karmic

From that list you'll get a bunch of versions. Chose the one from karmic-updates or karmic-security. Then install it:


# apt-get install python-profiler=2.6.4-0ubuntu1

Now, to avoid this causing a conflict and thus be removed the next time you do an upgrade you need to pin it. Create a file called /etc/apt/preferences and put the following into it:


Package: python-profiler
Pin: version 2.6.4-0ubuntu1
Pin-Priority: 999

And that concludes it. A word of warning from Jan:

"he slight problem is that with this setup, suppose a big security flaw was found in python-imaging and got patched in karmic that is still supported... you wouldn't get the package update. That is because it's pinned and while asterisks can be used in the version number, we don't know in advance what the version will match and what the Lucid version that we don't want will match"

"so you basically lose security upgrades for affected packages"

"minor annoyance when you have one or two packages on a laptop, but a big deal if you have a dozen packages on 100 VMs on server"

Having written about this helps me remember it myself for the next time I need it. Also, hopefully it will help other people who get bitten by this. Hopefully this will shame the Canonical guys into action so that the next time they don't haste their deprecation process and actually think about who's using their products. I bet a majority of Ubuntu's users care more about programming or something like that than they do about the ability to buy music on Ubuntu One or whatever it's called.

Comments

Namke von Federlein

Same problem. I agree. What a fake-out. Testing my own apps was the very last step of my first test install. Everything wonderful then - at the very end - that moment of quiet silence - what now?

The average person could care less. But it is rather impolite to programmers!

Basically, I got lucky. I could just rebuild my few little apps (ERIC + QT4 based).

Ubuntu 10.04 has a lot of great features but one huge legacy problem : during installation it does not ask what applications you wish to install.

Best example : I did a clean 10.04 install on one notebook for testing. So, Ubuntu merrily installs a bunch of apps - and I wait. Then I have to go through and uninstall several of them - and I wait again. This is one of the classic problems and well-known problems with Windows pre-installs!

This seems like a nerd legacy way of thinking. It's great to have the free software but don't second-guess users.

One alternative is to install the basic operating system and then start a GUI based app installer program (not the Ubuntu Software Center) which has a bunch of check boxes and app descriptions. I could then just check the apps that I want. Obviously, some would be "recommended" but : none should be pre-checked.

Glad to hear you managed to get your environment back up and running, too.

Thanks for this blog post!

ethnopunk

Thanks for the post, this is a major fail as far as Ubuntu is concerned. It would appear the OS is becoming increasingly closed as it seeks the illusive mirage of consumer lowest common denominator. This is really a case of shooting the goose which lays the golden egg, how can Canonical expect anybody to use Ubuntu seriously if upgrades deprecate without giving us any choice in the matter?

Peter Bengtsson

I agree. They have a lot on their plate and they do have to worry about profitability. But us "old timers" are important too because we're the ones recruiting new users to ubuntu.

aditya

Thanks a lot, after a lot of had banging i laded on this page ...

Jean Jordaan

Damn, couldn't believe my eyes when I saw 2.4 is missing :-(

Your email will never ever be published.

Related posts