@HEADER@

Paludis, the Other Package Mangler

Migrating to Paludis

There are two methods you can follow to migrate from Portage to Paludis: the manual method or the automated method. Also, it is now usually possible to migrate from Paludis back to Portage.

Warning: Migration is not always entirely reliable. If you've had an install for a long time, chances are your system contains a fair amount of cruft generated by buggy Portage versions. You may need to fix this manually.

No matter which method you plan to use, start by installing Paludis. There are ebuilds in the tree, or you can get SVN ebuilds (which Portage can't use) from the Paludis overlay. If you don't like the libxml2 and pcre++ dependencies, turn off the qa USE flag. Make sure you are using at least version 0.14 when following this guide.

How to Migrate from Portage to Paludis (the automated method)

The easiest way to migrate your configuration from Portage to Paludis is by using the portage2paludis.bash script, available via subversion. It is invoked as follows:
$ sudo ./portage2paludis.bash

A few notes on the migration script. The target configuration directory must not exist, or the script will bail out. This is to prevent it from clobbering an existing paludis config. Also, the script will not migrate your customized portage bashrc -- this is something you will have to do on your own.

The script will migrate your PORTDIR_OVERLAYS to Paludis as best as possible. Finally, the script will first try to name your repositories what their profiles/repo_name file says they should be called and, if that fails, they will be called what their top level directory is called (so, /usr/local/portage is called "portage"). If any name collisions occur, the script will terminate, and you will have to finish configuring your overlays on your own.

Now, try:

sudo paludis --sync
paludis -pi world

You will likely find that it picks up a few packages that Portage wouldn't. This is to be expected -- the Paludis dependency resolver is considerably more complete than the Portage one, and it will try to enforce runtime dependencies of already installed packages. In particular, this means that if you have any packages installed that have a virtual/x11 runtime dependency, the virtual will be pulled in.

You may encounter some nasty error messages, especially if you're running an old install and have some packages that were installed a very long time ago with a broken Portage release. In most cases, removing the VDB entry by hand and then immediately reinstalling the same version of the package using Paludis (or even a recent Portage) will suffice.

How to Migrate from Portage to Paludis (the manual method)

First, make some configuration files. For full details, see the configuration files documentation. For a quick template:

mkdir -p /etc/paludis/repositories

cat <<"END" > /etc/paludis/keywords.conf
*/*                 x86
dev-cpp/libebt      x86 ~x86
sys-apps/paludis    x86 ~x86
dev-util/subversion x86 ~x86
app-admin/eselect   x86 ~x86
sys-fs/udev         x86 ~x86
END

cat <<"END" > /etc/paludis/use.conf
*/* -doc nls -apache2
*/* LINGUAS: en
*/* INPUT_DEVICES: keyboard mouse
*/* VIDEO_CARDS: -* ati
app-editors/vim -nls
END

cat <<"END" > /etc/paludis/licenses.conf
*/* *
END

cat <<"END" > /etc/paludis/mirrors.conf
gentoo http://gentoo.blueyonder.co.uk/distfiles/
gnu http://gnu.blueyonder.co.uk/
debian http://debian.blueyonder.co.uk/
END

Set up your bashrc. This must NOT be used to change any values that affect dependency resolution (e.g. USE, LINGUAS). It can be used to set CFLAGS, CHOST and the like (on some archs you'll have to do this to avoid getting junk from your profile).

cat <<"END" > /etc/paludis/bashrc
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"
END

Set up your repository files. Do not tinker with the VDB location, it must go in ${ROOT}/var/db/pkg. Here we'll avoid using /usr/portage for the main tree because sticking data that gets changed on /usr is silly.

You will also need to specify names_cache for the ebuild format repositories and provides_cache for the VDB repositories. See the cache documentation.

cat <<"END" > /etc/paludis/repositories/gentoo.conf
location = /var/paludis/repositories/gentoo/
sync = rsync://rsync.europe.gentoo.org/gentoo-portage/
profiles = /var/paludis/repositories/gentoo/profiles/default-linux/x86/2006.0
format = ebuild
END

cat <<"END" > /etc/paludis/repositories/installed.conf
location = /var/db/pkg/
format = vdb
END

cat <<"END" > /etc/paludis/repositories/paludis-overlay.conf
location = /var/paludis/repositories/paludis-overlay/
sync = svn://svn.pioto.org/paludis/overlay
cache = /var/empty
format = ebuild
master_repository = gentoo
END

The world file for Paludis lives in the VDB directory. For Portage compatibility, a symlink can be used (but be careful when uninstalling Portage if you use this route).

sudo ln -s /var/lib/portage/world /var/db/pkg/world

Now, try:

sudo paludis --sync
paludis -pi world

You will likely find that it picks up a few packages that Portage wouldn't. This is to be expected -- the Paludis dependency resolver is considerably more complete than the Portage one, and it will try to enforce runtime dependencies of already installed packages. In particular, this means that if you have any packages installed that have a virtual/x11 runtime dependency, the virtual will be pulled in.

You may encounter some nasty error messages, especially if you're running an old install and have some packages that were installed a very long time ago with a broken Portage release. In most cases, removing the VDB entry by hand and then immediately reinstalling the same version of the package using Paludis (or even a recent Portage) will suffice.

How to Migrate from Paludis to Portage

Start by uninstalling any packages that use -scm or -try. Also rm -fr any .cache directories created inside repository directories.

Finally emerge --sync (this is important) and you might be back to normal. If you encounter weird failures when upgrading or uninstalling packages that were installed by Paludis, removing the VDB entry by hand and then immediately reinstalling the same version of the package using Portage will usually fix things.

@FOOTER@