Gentoo major version KDE upgrade HOWTO

This HOWTO will show you how to upgrade from kde 4.3 to kde 4.4 (and possibly others) with as few problems as possible (It went through without errors for me). The whole process including merging will take 4 to 10 hours depending on your PC. Plan accordingly.

Before upgrading check if you use the latest packages. Additionally I will assume you have autounmask, eix and gentoolkit installed. Portage 2.2 might also come in handy because it can automatically resume builds of many packages (–keep-going) when only few of them fail.

[code lang=”bash”]
emerge –sync
emerge -nva gentoolkit autounmask eix
eix-update
[/code]

If you want to use your computer while updating KDE it is pretty neat to have an alternative login and windowmanager installed. I prefer gdm and enlightenment.

[code lang=”bash”] emerge -nva eix gdm enlightenment
[/code]

 

Preparing the upgrade

[code lang=”bash”]
#create a working directory
mkdir /root/kde-upgrade

#save the list of your kde 4.3 packages
eix -I –slot 4.3 -C kde-base –only-names > /root/kde-upgrade/kde-old
#save the list of packages installed by which are also avalaible for kde 4.4
eix -I –slot 4.4 -C kde-base –only-names > /root/kde-upgrade/kde-new
#save the list of installed qt-packages
eix –slot 4 -C x11-libs –only-names -I qt > /root/kde-upgrade/qt-packages
#KDE 4.4 needs QT-4.6 that is why we create a list of all qt-packages and keyword them for later use. Be sure to change ~amd64 to your architecture
eix –slot 4 -C x11-libs –only-names -I qt | while read line; do echo “$line ~amd64” >> /root/kde-upgrade/qt-keywords; done
[/code]

Copy the qt-keywords to your package.keywords directory

[code lang=”bash”]
cp /root/kde-upgrade/qt-keywords /etc/portage/package.keywords/
[/code]

Download and install kde-4.4 keywords

[code lang=”bash”]
cd /root/kde-upgrade
wget -O kde-4.4-keywords “http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=blob_plain;f=Documentation/package.keywords/kde-4.4.keywords;hb=HEAD”
cp -p /root/kde-upgrade/kde-4.4-keywords /etc/portage/package.keywords/
[/code]

 

Prepare your alternative Desktop environment

Now we are starting with the essential stuff. Log out from kde and shutdown kdm from one the Ctrl-ALT-Fx-Terminals and start your favorite alternative login manager.

[code lang=”bash”]
/etc/init.d/xdm stop
#Start other login manager
gdm
[/code]

After that you can login again on Ctrl-ALT-F7.


Upgrade QT and remove old KDE

Update your qt installation now because KDE 4.4 requires qt 4.6.

[code lang=”bash”]
emerge -va `cat /root/kde-upgrade/qt-packages`
[/code]

After that we are ready to remove the old KDE. Old KDE version’s packages would be removed by an upgrade anyway. When we remove them before our installation we will save us a lot of hassle concerning package blocks etc.

I heard unmerging the old kde version is completely unnessessary now, as newer portage versions will handle softblocks by themselves. So it is completely ok to skip the unmerging.

[code lang=”bash”]
emerge -C `cat /root/kde-upgrade/kde-old`
[/code]

 

(While emerging qt) Check for keyworded packages

While QT ist emerging switch to another terminal and check if your following KDE merge has all its dependencies in place.

[code lang=”bash”]
#try to
emerge -vau `cat /root/kde-upgrade/kde-new`
[/code]

If you get an error about missing keywords on dependant packages, execute:

[code lang=”bash”]
autounmask package_category/package_name-package_version
[/code]

on the corresponding package (the package mentioned in “dependency required by”). Personally I had to autounmask phonon-kde, kopete, kdebase-runtime-meta, kaddressbook and libiodbc. Libiodbc-3.52.6 failed on ~amd64 so I installed the keyworded version which built normally.

 

(After emerging QT) Rebuild Qt dependant packages

Rebuild all qt-dependendant packages.

[code lang=”bash”] emerge -1va sip PyQt4 qscintilla qscintilla-python
[/code]

Apart from these packages you will have to rebuild all installed kde-themes in portage. After that remerge Phonon. I had to do this and for you it will not hurt ;-).

[code lang=”bash”]
#emerge your new kde’s phonon version
emerge -1va phonon
[/code]

 

Emerge your new KDE

So sit back and relax. The biggest part of the work is done now. Emerging new KDE packages will take several hours depending on your CPU power. It is best to do this over night. If you peek at the following command you will see a –keep-going at the end. This tells Portage-2.2 to automatically resume the whole merge with packages not depending on the failed package when a package fails. If you use Portage-2.1 remove this option and beg that you will wake up with a fresh and shiny new version of KDE.

[code lang=”bash”]
#DO!
emerge -va `cat /root/kde-upgrade/kde-new` –keep-going
[/code]

 

Final work

After our work before kde should build without errors. At least it did for me… If there remain errors visit http://forums.gentoo.org in your spare desktop environment.

[code lang=”bash”]
#revdep-rebuild to rebuild packages like e.g. digikam or similar
revdep-rebuild
#update your config files
etc-update
#read announcements generated during upgrade
eread
[/code]

If all is done, you can log-out from your temporary desktop environment,
kill your other login manager and start kdm again. Then log-in to your new shiny kde version and enjoy.

If you have suggestions or improvements let me know.
Hope this helps,
Phillip

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.