Search:  
Gentoo Wiki

HOWTO_Update_KDE_without_downloading_full_sources

Image:Klogo-official_100x100.png

K Desktop Environment

Location: HOWTO Update KDE without downloading full sources

KDE Pages

Install

Applications

Upgrading

Tips

Other


edit

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

Contents

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.

Requirements

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

Background

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.

Installation

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 kdedelta.sh.

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

File: kdedelta.sh
KDE_OLD="3.3.1"
KDE_NEW="3.3.2"
File: kdedelta.sh
ARTS_OLD="1.2.2"
ARTS_NEW="1.2.3"

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 kdedelta.sh script:

# sh kdedelta.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.

Tips

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 kdedelta.sh kde-3.3.1

Comment out

cd $DISTDIR

and

rm $DELTAFILE

from kdedelta.sh 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!

Credits

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