Ubuntu KDE Package Dependency Hell
patrick — Wed, 2010-03-24 15:00
I recently upgraded my mythtv setup to Ubuntu's Koala and had some permissions issues. As all UID/GID settings in /etc/passwd and /etc/group were previously set up correctly so that NFS would work correctly across multiple computers the only thing I can think of is that when the upgrade process removed certain packages in preparation for re-adding the newer packages it also stripped those users and groups out of my /etc/passwd and /etc/group files. As my desktop had the old UIDs and GIDs I compared them to the new UIDs and GIDs on my mythtv backend and my mythtv frontend and all 3 had different UIDs and GIDs.
In attempting to fix the issue on my mythtv frontend I ended up screwing up a couple of things and decided to do a clean install of xubuntu. After it set up the new file system (and before rebooting and adding more packages) I copied the /target/etc/passwd and /target/etc/group to my desktop, injected all the various users and groups I needed across all my boxes (making sure UIDs and GIDs didn't overlap), and added a couple items to /target/etc/shadow.
I then allowed the installation process to eject the live CD and reboot the computer. When it finished booting I logged in and started installing a few items I knew I needed - mythtv-frontend (making sure it wasn't installing the backend, which would be redundant), vlc, k3b, kaffeine, amarok, sun-java6-jdk, php5-cli, php-pear, php-getid3, and mysql-client. In the process of trying to add all of these I noticed that mysql-server-core-5.1 was being automatically installed... Why?
I started digging through the dependencies of packages I knew utilized a MySQL server - MythTV, Amarok, PHP, and the MySQL client...
The MythTV backend and all of the MythTV clients share the same MySQL database on my MythTV backend. As far as I can tell MythTV saves most of the client settings and based on the box name (so different clients can have different settings). The MythTV backend(s) use global settings (i.e. not box specific) to figure out which tuners to use to record shows. MythTV records shows based on the tuners and the tuners have settings in the database that define which backend the tuner is on. Neither the mythtv-backend nor mythtv-backend-master depend on mysql-server (mythtv-backend-master does depend on mythtv-database which in turn depends on mysql-client) as it's realized that you might want to have your database on yet another separate box.
Amarok requires a database, but depending on which version you have it can use SQLite or MySQL (either locally or remotely). I have Amarok set up on both my desktop and MythTV frontend to utilize the same MySQL database located on my MythTV backend. This can cause problems with auto-updating your music collection, but I have my music collection mounted at /var/lib/mythtv/music/ on both my desktop and my MythTV frontend so that the paths do not collide in the database.
All of my testing and development stuff utilizes the MySQL server on my fileserver. This includes when I'm testing development stuff on my desktop. Depending on why I'm setting up a virtual machine for testing I may or may not install a database server locally in the virtual machine.
Granted, my MythTV frontend isn't used for my normal development stuff, but I do have a number of PHP scripts I've been using (located under /var/lib/mythtv/music/ being shared by my MythTV backend). 1 of the PHP scripts I just finished writing allows me to pull FLVs from Youtube (people playing their musical instrument in their garage, living room, etc) and convert them to mp3. Another PHP script I use to manage a couple of my dynamic
m3u playlists (I'm currently rewriting this so it will hopefully generate iTunes importable playlists as well) that are constantly added to when I download new music from emusic, iTunes, etc or when I rip music from a CD.
So far I've managed to keep mysql-server from being installed on my desktop or my MythTV frontend. Why? There's no need to have various databases running amok across multiple machines which ends up making backing them up that much more difficult and/or annoying. Unless you need to due to space or performance issues it's usually a good idea to cut down on the number of boxes running database servers.
Ok, so far MythTV, Amarok, and PHP are not depending on the MySQL server package. So I'm guessing it has to be the MySQL client that is requiring the server package, but that just doesn't make any sense because as far back as I remember using Debian the client has never required the server. I check the dependencies and the client doesn't require the server. I try installing all of the packages again, only this time I specifically use the --without-recommends switch... And it still wants to install mysql-server-core-5.1.
Rather than dig through dependencies of dependencies I decide to use pinning to get to the bottom of this. I open /etc/apt/preferences and add the following lines:
Package: mysql-server-core-5.1 Pin: release a=0.1 Pin-Priority: 850
I run
and then try to install everything again. I get an error message that aptitude updateakonadi-server is broken because it can't install mysql-server-core-5.1... What in the world is akonadi-server?
Akonadi is an extensible cross-desktop Personal Information Management (PIM) storage service. It provides a common framework for applications to store and access mail, calendars, addressbooks, and other PIM data.This package contains the Akonadi PIM storage server and associated programs.
Ok, what is it exactly that I'm installing that's requiring a PIM server? I could understand if something was requiring a library for a PIM, but a PIM or a server for a PIM? What the hell?!
I repeat the pinning process adding it to /etc/apt/preferences, run
, and attempt to install everything again. This time aptitude updateplasma-widgets-workspace is broken as well. Rinse, repeat - kdebase-workspace-bin is broken. Rinse, repeat - k3b is broken... What?!
Sure enough, looking at the dependencies k3b depends on kdebase-workspace-bin which depends on plasma-widgets-workspace which depends on akonadi-server which depends on mysql-server-core-5.1. So now I'm trying to figure out why K3b suddenly has this very weird dependency tree...
Package: k3b
State: not installed
Version: 1.68.0~alpha3-0ubuntu1
Priority: optional
Section: otherosfs
Maintainer: Kubuntu Developers <kubuntu-devel@lists.ubuntu.com>
Uncompressed Size: 1,884kDepends: kdebase-runtime (>= 4:4.3.2), kdelibs5 (>= 4:4.3.2), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libice6 (>= 1:1.0.0), libk3b6, libkcddb4 (>= 4:4.2.96), libmusicbrainz4c2a (>= 2.1.5), libqt4-dbus (>= 4.5.1), libqt4-network (>= 4.5.1), libqt4-qt3support (>= 4.5.1), libqt4-svg (>= 4.5.1), libqt4-webkit (>= 4.5.1), libqt4-xml (>= 4.5.1), libqtcore4 (>= 4.5.1), libqtgui4 (>= 4.5.1), libsm6, libstdc++6 (>= 4.1.1), libx11-6, libxau6, libxdmcp6, libxext6, libxft2 (> 2.1.1), wodim | cdrskin, cdparanoia (>= 3a9.8), genisoimage, cdrdao (>= 1.1.7-5), k3b-data (= 1.68.0~alpha3-0ubuntu1), kdebase-workspace-binSuggests: normalize-audio, toolame, sox, movixmaker-2, vcdimager (>= 0.7), dvd+rw-tools, kdebase-kio-plugins, transcodeDescription: A sophisticated KDE CD burning application
K3b is a GUI frontend to the CD recording programs cdrdao and cdrecord. Its aim is to provide a very user friendly interface to all the tasks that come with cd recording.It can be used to copy CDs and burn:
* audio CDs (from wav, mp3 or ogg vorbis files)
* data CDs and DVDs
* mixed-mode CDs (CD-Extra support)
* VCDs (1.1, 2.0 and SVCD)
* ISO files (Joliet/Rockridge and El Torito support)
* eMovix CDs
Homepage: http://www.k3b.org
It seems like kdebase-workspace-bin was tacked on at the end, but it may have some required libraries or something in it...
shows that it has a large dependency list as well, almost as though it's a melting pot of KDE and X libraries and utilities, just as the description states:aptitude show kdebase-workspace-bin
Description: core binaries for the KDE 4 base workspace module
This package contains miscellaneous programs needed for a basic KDE 4 desktop installation. Among other standard KDE 4 desktop components, the package provides startkde scripts, ksmserver (the KDE 4 session manager) and the main Plasma shell, which manages most KDE 4 visual user interface components. This package is essential to start and use KDE 4 Desktop Environment.This package is part of the KDE 4 base workspace module.
Homepage: http://www.kde.org/
Considering K3b is a KDE app I completely understand the need for it to pull in various other packages ...needed for a basic KDE 4 desktop installation
even though I'm using Xfce for my desktop. On to the next package in this tree - plasma-widgets-workspace. Something new for KDE4 is the plasma engine which allows you to do all sorts of nifty things like put widgets on your desktop. I think it was Ubuntu Intrepid which first added KDE4 and the plasma engine kept crashing on me causing the entire desktop to stop responding to input. The normal CTRL+ALT+Backspace for restarting X ended up being added to the plasma engine as an option which did me absolutely no good. Initially I'd ssh in from another box and check the running processes - oh gee, plasma-engine is no longer a running process, no wonder CTRL+ALT+Backspace doesn't work... Also, while running widgets on the desktop is nifty they're only useful if you can actually see your desktop, but with Firefox maximized on 1 monitor and a Terminal maximized on the other monitor plus all the other running programs I almost never see the desktop. I much prefer tray and panel applications over desktop widgets and last I checked Xfce has a lot more of the ones I want than KDE4, not to mention did KDE4 ever get around to having a quick launch bar? I remember something somebody hacked together, but it didn't allow for drag and drop off the K-menu. Anyways, the description for plasma-widgets-workspace:
Description: KDE 4 base workspace Plasma widgets and containments
This package contains standard Plasma widgets and containments shipped in the KDE 4 base workspace module. They provide such basic desktop functionality as the panel, task manager, application laucher, clock and more. The default KDE 4 desktop is a combination of these visual components.This package also includes the default animator used by the main KDE 4 Plasma shell.
This package is part of the KDE 4 base workspace module.
Homepage: http://www.kde.org/
Grumble, grumble... Ok, not really needed by K3b AFAIK, but considering it provides KDE4 with a panel, task manager, application launcher, and a clock I can understand that it's ...needed for a basic KDE 4 desktop installation
. However, this plasma-widgets-workspace depends on akonadi-server?? Let's look at the entire package to see if I missed something earlier:
Package: akonadi-server
State: not installed
Version: 1.2.1-0ubuntu4
Priority: extra
Section: net
Maintainer: Kubuntu Developers <kubuntu-devel@lists.ubuntu.com>
Uncompressed Size: 10.5MDepends: libakonadiprivate1 (>= 1.2.0), libboost-program-options1.38.0 (>= 1.38.0-1), libc6 (>= 2.7), libgcc1 (>= 1:4.1.1), libqt4-dbus (>= 4.5.1), libqtcore4 (>= 4.5.1), libstdc++6 (>= 4.4.0), libwrap0 (>= 7.6-4~), zlib1g (>= 1:1.1.4), mysql-server-core-5.1, libqt4-sql-mysqlDescription: Akonadi PIM storage service Akonadi is an extensible cross-desktop Personal Information Management (PIM) storage service. It provides a common framework for applications to store and access mail, calendars, addressbooks, and other PIM data.This package contains the Akonadi PIM storage server and associated programs.
Homepage: http://pim.kde.org/akonadi
Hmm... Let's see, K3b already depends on libc6, libgcc1, libqt4-dbus, libqtcore4, and libstdc++6 so that leaves the following as new packages: libakonadiprivate1, libboost-program-options1.38.0, libwrap0, zlib1g, and libqt4-sql-mysql. Running
shows that aptitude search libakonadiprivate1 libboost-program-options1.38.0 libwrap0 zlib1g libqt4-sql-mysqllibqt4-sql-mysql, libwrap0, and zlib1g are already installed, leaving me wondering about libakonadiprivate1 and libboost-program-options1.38.0.
Even considering the extra non-MythTV stuff I do on my MythTV frontend I don't need PIM software floating around on it. Doing some searching I did discover a bug report for the akonadi package in Jaunty - https://bugs.launchpad.net/ubuntu/+source/akonadi/+bug/304010 stating the annoyance that kubuntu-desktop drags in mysql-server-5.0 due to the akonadi package, but it's status is Fix Released
. I was thinking of adding the K3b project to it as well, but I'm not sure how to indicate that it's still a problem in Koala (not just Jaunty).
For those that are curious I used
across several boxes to see what required that aptitude whylibqt4-sql-mysql, libwrap0, and zlib1g be installed.
- libqt4-sql-mysql
- mythtv-frontend (and several other myth packages like mythweather) Depends libmyth-0.22-0 Depends libqt4-sql-mysql
- devscripts Recommends subversion | cvs | svk | tla | bzr | git-core | mercurial
- mercurial Recommends rcs | kdiff3 | tkdiff | meld
- kdiff3 Depends libqt4-qt3support Depends libqt4-sql Recommends libqt4-sql-mysql | libqt4-sql-odbc | libqt4-sql-psql | libqt4-sql-sqlite | libqt4-sql-sqlite2
- mercurial Recommends rcs | kdiff3 | tkdiff | meld
- libwrap0
- gdm Depends libwrap0
- libpulse0 Depends libwrap0
- openssh-server Depends libwrap0
- zlib1g
- php5-cli Depends zlib1g
- k3b (1.0.5+kde4svn935857+really1.0.5-3ubuntu5 from jaunty) Depends zlib1g
- samba Depends zlib1g
- mplayer Depends zlib1g
Using -v option with
shows a lot more than just the 1 package, but let's just leave it at the fact that there are a lot of packages that depend, recommend, or suggest a lot of other packages that depend on these 3 packages.aptitude why
OTOH my Jaunty box states E: No package named "libboost-program-options1.38.0" exists.
, but does point out that kdepimlibs5 depends on libakonadiprivate1. My Koala boxes show that kdepimlibs5 depends on libakonadiprivate1 which then depends on libboost-program-options1.38.0... So I used the -v switch and found out that basically if you need kmail, knode, kpilot, or python-kde4 you'll end up installing kdepimlibs5.
Tiring of this fun I logged onto freenode and joined the #kubuntu channel to see if anybody knew why K3b suddenly had this asinine dependency. Nobody had an answer, but I did get some sympathy. 1 person even commented that they were surprised that an alpha version was used as it still had some bugs... Which brings me to my other issue... I apparently hadn't been paying much attention when I updated my desktop to Koala as I have the latest and (not the) greatest K3b installed which also means I have mysql-server-core-5.1 installed on my desktop as well.
Since I've not had K3b installed on my MythTV frontend I've been using K3b on my desktop a lot to burn data backup DVDs, copy DVDs full of photos, etc and I keep running into problems trying to copy the 8gb DVDs. K3b fails with an error message of Growisofs >= 5.20 is needed to write Double Layer DVD+R.
which doesn't make any sense because:
$ growisofs --version * growisofs by <appro@fy.chalmers.se>, version 7.1, front-ending to genisoimage: genisoimage 1.1.9 (Linux)
Isn't that >= 5.20? Why then am I getting the error? Only thing I can think of is going back to what the user in freenode#kubuntu said about the alpha having problems (it is an alpha after all).
So to fix my problem I decided to try to install an older version of the deb. I went to http://packages.ubuntu.com/jaunty/k3b and noted that it is an older version than what's currently in Koala so I went to the bottom of the page to the Download k3b
and clicked the amd64
link which gave me a page of mirrors to download it from. I then used
to install it and it complained that a bunch of dependencies were not installed. I used aptitude to install all of them, but noticed that it was balking at installing 2 packages as it'd still leave K3b broken. Going back to the package page I followed the links for dpkg -i k3b_*.debk3b-data and libk3b3 and used dpkg -i to install those as well. I removed k3b-data and libk3b3 from the list of dependencies I was trying to install via aptitude and let aptitude download and install the dependencies and finish configuring k3b, k3b-data and libk3b3. When it was done it stated that there were some updates that needed to be made (the K3b Jaunty packages I'd just installed) so I needed to add some extra apt pins to make sure any future
wouldn't update my aptitude safe-updatefix
. My current /etc/apt/preferences looks like this:
# Comments Package: pulseaudio Pin: release a=0.1 Pin-Priority: 850 Package: icedtea6-plugin Pin: release a=0.1 Pin-Priority: 850 Package: openjdk-6-jre Pin: release a=0.1 Pin-Priority: 850 Package: audacious Pin: release a=0.1 Pin-Priority: 850 Package: mysql-server-core-5.1 Pin: release a=0.1 Pin-Priority: 850 Package: akonadi-server Pin: release a=0.1 Pin-Priority: 850 Package: plasma-widgets-workspace Pin: release a=0.1 Pin-Priority: 850 Package: k3b Pin: release a=1.0.5 Pin-Priority: 850 Package: k3b-data Pin: release a=1.0.5 Pin-Priority: 850 Package: libk3b3 Pin: release a=1.0.5 Pin-Priority: 850
The 1st line is to prevent a comments bug and I'm not sure if it's been fixed or not. The Pin of release a=0.1 tells apt to never bother with a version newer than 0.1 effectively telling it (in most cases) to never bother with the package at all. As a personal preference across all of my boxes I don't ever want to install pulseaudio, icedtea6-plugin, openjdk-6-jre, or audacious and these seem to be the default in lots of dependency "or" statements (I use Eclipse and don't have time to screw around with possible issues openjdk can cause so I stick with the sun-java6 packages and icedtea6-plugin depends on openjdk). Followed by my new additions of mysql-server-core-5.1, akonadi-server, plasma-widgets-workspace that don't need to ever be installed on my MythTV frontend.
I then set the Pin at release a=1.0.5 for k3b, k3b-data, libk3b3 as that's the current version I have installed. I could set this to 0.1 as well, but I want to make it obvious to anyone else that looks at it that K3b was meant to be installed. Please note that there's probably a better way to pin these, but these settings have worked for me.
Poking around I also found the entire OpenOffice.org suite, AbiWord, Gnumeric, The GIMP, Thunderbird, and Transmission (a torrent client) among other things were installed. Remember though that I installed from a Xubuntu Live CD and these are all useful for a normal desktop. Luckily xubuntu-desktop doesn't depend on these, only recommends them so I was easily able to uninstall them without too much fuss. I have had a rare occasion to use OpenOffice.org-calc on my MythTV frontend so I left that. As it's my primary way of watching TV and depending on where I'm located the box my be more publicly available than my other computers so I figure I can leave some of the other programs (like the games) on it.