Tell aptitude to ignore broken package

If you installed the program via a deb-file and dpkg, you could also alter the dependencies of the installed .deb file manually. I was driven to this extreme measure once ...

ar x foo.deb
vim control.tar.xz  # see below
ar r foo.deb control.tar.xz
dpkg -i foo.deb

and dpkg does not know about the dependencies of foo anymore. In vim you have to select ./control (I use vim to read packed files -- unpack and use another editor and repack if you like) and remove the unwanted dependencies from the line

Depends: foo bar

There's a hacked solution at the Ubuntuforums. ~quack's solution is better, but more work.

I couldn't find anything on google about this, save compiling your own 'dummy package' (impossible without uninstalling the broken package(s). unless you are lucky enough to already have the tools), but searching my own hard drive gave me the answer eventually!

For anyone who'd like to know, here's how to "unbreak" a package in synaptic / aptitude / apt-get, without uninstalling it.

First of all, make a note of the package you installed, and the package(s) it depends upon that give it a broken status. Say I forced an install of apples, which depends on the package obsolete which isn't in the repository :

In a terminal type Code:

sudo gedit /var/lib/dpkg/status

search the file for apples until you find something like :

Code:

Package: apples
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 316
Maintainer:
Architecture: i386
Source: applesauce
Version: 1.0.10-1
Depends: packageA, packageB, obsolete
Description: Apples on your desktop!

Remove obsolete from the Depends: row, save the file, and you're done. Hope this helps some people out.


In aptitude's Preferences section (Ctrl-T to get into the menu; under Options), uncheck the option in the "Dependency Handling" section that says "Automatically fix broken packages before installing or removing". That should make aptitude stop trying to fix the package each time you change other packages.

As a more permanent fix, you should grab the source packages for the Lucid Amsynth package you installed, as well as source packages for libatk1 and libjack0, and build your own updated package. Depending on what else uses those libraries, you might need to update other packages as well, but you can probably get away with just those. (This is essentially backporting those packages from Lucid to Karmic -- you should check the Karmic-backports repository or the PPAs to see if anyone's already done this. If your new packages work, consider sending them to Karmic-backports for others to use.)