aboutsummaryrefslogtreecommitdiff
path: root/doc/doc_migration_howto.doxygen
blob: ee544aed1856b24aa742cc02e6b64f16859baa21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/* vim: set ft=cpp tw=80 sw=4 et : */

/**
\page MigrationHowto Migration Howto

\warning Do not file bugs related to Paludis on Gentoo Bugzilla. Do not discuss
    Paludis on Gentoo mailing lists or forums. Do not pester Gentoo developers
    about Paludis. Read the \link KnownIssues known issues \endlink list.

There are two methods you can follow to migrate from Portage to Paludis, the
\ref MigrationHowtoPortageToPaludisManual "Manual Method", and the \ref
MigrationHowtoPortageToPaludisAutomated "Automated Method". Also, it is now
usually possible to migrate \ref MigrationHowtoPaludisToPortage "from Paludis back to Portage".

\section MigrationHowtoPortageToPaludisAutomated How to Migrate from Portage to Paludis (the automated method)

Ideally, you'd install Paludis from scratch. However, it's usually possible to
migrate from Portage to Paludis without too many issues.

\warning Migration is not entirely reliable.

Start by installing Paludis. There are ebuilds in the tree, or you can get SVN
ebuilds (which Portage can't use) from
<a href="http://svn.pioto.org/viewvc/paludis/overlay/"> the Paludis overlay</a>.
If you don't like the <code>libxml2</code> and <code>pcre++</code> dependencies,
turn off the <code>qa</code> USE flag. <b>Make sure you are using at least
version 0.6</b> when following this guide.

The easiest way to migrate your configuration from Portage to Paludis is by
using the <a href="http://svn.pioto.org/viewvc/paludis/scratch/scripts/portage2paludis.bash">portage2paludis.bash</a> script, available via subversion. It is invoked as follows:

\verbatim
$ sudo ./portage2paludis.bash
Portage2Paludis:

This script will attempt to convert an existing portage configuration to
a paludis configuration. It assumes that the portage configuration can
be found via /etc/make.conf, /etc/make.profile, and /etc/portage/*

Please enter where you would like your new paludis configuration to be
created, or press enter to use the default.

Paludis Config Directory [/etc/paludis]: 

* Configuration Files:
Generating use.conf (Pass 1 of 3)... done.
Generating use.conf (Pass 2 of 3)... done.
Generating use.conf (Pass 3 of 3)... done.
Generating bashrc (Pass 1 of 1)... done.
Generating keywords.conf (Pass 1 of 2)... done.
Generating keywords.conf (Pass 2 of 2)... done.
Generating mirrors.conf (Pass 1 of 1)... done.
Generating package_mask.conf (Pass 1 of 1)... done.
Generating package_unmask.conf (Pass 1 of 1)... done.
Generating licenses.conf stub (Pass 1 of 1)... done.

* Standard Repositories:
Generating gentoo.conf (/usr/portage) (Pass 1 of 1)... done.
Generating installed.conf (/var/db/pkg) (Pass 1 of 1)... done.
Creating /var/db/pkg/world -> /var/lib/portage/world symlink... done.

* Overlays:
Generating portage.conf (/usr/local/portage) (Pass 1 of 1)... done.
Generating vmware.conf (/usr/portage/local/layman/vmware) (Pass 1 of 1)... done.

Complete!
You now have a new paludis config in: /etc/paludis
\endverbatim

A few notes on the migration script. The target directory <b>must not exist</b>,
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, that is somethign you will have to do on your own.

The script will migrate your <code>PORTDIR_OVERLAYS</code> to Paludis as best as
possible, but, currently, Paludis doesn't support all the sync methods that
<i>layman</i> does, so you will still probably want to run <code>layman
-S</code> to update any layman repositories you have now. 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:

\verbatim
sudo paludis --sync
paludis -pi world
\endverbatim

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 <code>virtual/x11</code> 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.

\section MigrationHowtoPortageToPaludisManual How to Migrate from Portage to Paludis (the manual method)

Ideally, you'd install Paludis from scratch. However, it's usually possible to
migrate from Portage to Paludis without too many issues.

\warning Migration is not entirely reliable.

Start by installing Paludis. There are ebuilds in the tree, or you can get SVN
ebuilds (which Portage can't use) from
<a href="http://svn.pioto.org/viewvc/paludis/overlay/"> the Paludis overlay</a>.
If you don't like the <code>libxml2</code> and <code>pcre++</code> dependencies,
turn off the <code>qa</code> USE flag. <b>Make sure you are using at least
version 0.6</b> when following this guide.

Next, make some configuration files. For full details, see \link ConfigurationFiles
the configuration files documentation \endlink . For a quick template:

\verbatim
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
\endverbatim

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

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

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

\verbatim
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 = portage
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
profiles = /var/paludis/repositories/gentoo/profiles/default-linux/x86/2006.0
eclassdirs = /var/paludis/repositories/gentoo/eclass
distdir = /var/paludis/repositories/gentoo/distfiles
cache = /var/empty
format = portage
importance = 10
END
\endverbatim

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).

\verbatim
sudo ln -s /var/lib/portage/world /var/db/pkg/world
\endverbatim

Now, try:

\verbatim
sudo paludis --sync
paludis -pi world
\endverbatim

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 <code>virtual/x11</code> 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.

\section MigrationHowtoPaludisToPortage How to Migrate from Paludis to Portage

\warning Migration is not entirely reliable.

If, and only if, you have at any point used a Paludis version below 0.6, start
with:

\verbatim
# For people who used Paludis before 0.6 only!
rm -fr /var/db/pkg/virtual
\endverbatim

Then <code>emerge --sync</code> (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.

*/