Gentoo Wiki



K Desktop Environment

Location: HOWTO Update KDE without downloading full sources

KDE Pages







This HOWTO does not work between two successive major versions of KDE - for ex., 3.2 to 3.3.


Future Zone

Since KDE 3.4, split ebuilds support a global USE flag called kdexdeltas. Enable the kdexdeltas useflag and the ebuilds will download and use the necessary xdeltas automatically. The only difference compared to the instructions below is that you won't get the newest-version tarballs in your $DISTDIR; emerge will store the old tarballs and the xdeltas, and run xdelta in src_unpack.


This HOWTO is especially useful for dial-up users who can't download full sources that are pretty big.


If you aren't bothered about how things work, skip this section and head directly to Installation.

The basis of this HOWTO lies in delta patches that KDE releases for each version. Deltas encode the differences between two versions of a document. A delta is very similar to a patch. But deltas are compressed to save space.

For more info about deltas, head to the delta website.

So, what we'll do is download the delta packages for kde and merge them with existing sources, thereby getting new versions without the hassle of huge file downloads.


Firstly, we'll need the dev-util/xdelta package. So let's emerge it:

# emerge xdelta

Next, you'll need the script that will automate the whole process. Download the script from here and save it as

Now you'll have to do some editing to tell the script the existing and new versions of Arts and KDE. Edit in your favorite text editor and make the following changes:


Make sure you that the versions are successive minor versions. KDE does not release a patch for 3.4 from 3.2 or 3.3.0 to 3.3.2.

Now, you might want to add/delete a few packages that get upgraded. You can change them in the KDE_PACKAGES variable. For example, I didn't want SDK for KDE, so i removed kdesdk from the list.

Make sure you're connected to the net and start the script:

# sh

The script will download the delta patches for packages that are present in distfiles and the new package if the package does not exist. The delta patches are then applied to the existing sources and new tarballs are created. The script then removes the delta patches.

Once the script finishes, you'll have the newer version of KDE.


The safer way of doing things: Create a directory and store all your existing KDE sources and the script itself:

# mkdir kde-3.3.1
# cd kde-3.3.1
# cp /usr/portage/distfiles/kde*3.3.1.tar.bz2 .
# cp kde-3.3.1

Comment out




from to use the sources from the new directory and to keep the delta patches.

Run the script. You should end up having the new tarballs in the current directory. Copy them to distfiles:

# cp kde*3.3.2.tar.bz2 /usr/portage/distfiles

Emerge and enjoy!


Nicolai Lissner <nlissne at linux01 dot gwdg dot de> for his wonderful script

Original forum post

Last modified: Sat, 06 Sep 2008 07:51:00 +0000 Hits: 26,589