1 |
Christopher Friedt <chrisfriedt@×××××.com> writes: |
2 |
|
3 |
> I'd like to copy the entire prefix directory (currently |
4 |
> ${HOME}/Gentoo) to a different directory (actually, to a different |
5 |
> directory on somebody else's machine). |
6 |
> |
7 |
> Knowing that many binaries have rpaths directly hard-coded, and that a |
8 |
> lot of shebangs (#!) in scripts are modified by the prefix hooks in |
9 |
> portage, is there an easy way to do this. |
10 |
> |
11 |
> E.g. copy prefix directory contents to new machine, run script to fix |
12 |
> all rpaths and shebangs |
13 |
|
14 |
Suppose the old Prefix is BPREFIX and new one EPREFIX, I'll do it like |
15 |
this: |
16 |
|
17 |
mv $BPREFIX $EPREFIX |
18 |
ln -s $EPREFIX $BPREFIX |
19 |
export PORTAGE_OVERRIDE_EPREFIX=$EPREFIX |
20 |
emerge portage binutils-config |
21 |
emerge -e @system |
22 |
emerge -e @world |
23 |
sed -i "s,$BPREFIX,$EPREFIX,g" $EPREFIX/startprefix |
24 |
rm $BPREFIX |
25 |
|
26 |
not guaranteed, you may come across minor errors, but that's the idea. |
27 |
|
28 |
Cheers |