Gentoo Archives: gentoo-alt

From: Konstantin Tokarev <annulen@××××××.ru>
To: "gentoo-alt@l.g.o" <gentoo-alt@l.g.o>
Subject: Re: [gentoo-alt] copy prefix to new directory / machine
Date: Wed, 16 Oct 2013 08:39:41
Message-Id: 354251381912774@web11h.yandex.ru
In Reply to: Re: [gentoo-alt] copy prefix to new directory / machine by heroxbd@gmail.com
1 16.10.2013, 07:49, "heroxbd@×××××.com" <heroxbd@×××××.com>:
2 > Christopher Friedt <chrisfriedt@×××××.com> writes:
3 >
4 >> šI'd like to copy the entire prefix directory (currently
5 >> š${HOME}/Gentoo) to a different directory (actually, to a different
6 >> šdirectory on somebody else's machine).
7 >>
8 >> šKnowing that many binaries have rpaths directly hard-coded, and that a
9 >> šlot of shebangs (#!) in scripts are modified by the prefix hooks in
10 >> športage, is there an easy way to do this.
11 >>
12 >> šE.g. copy prefix directory contents to new machine, run script to fix
13 >> šall rpaths and shebangs
14 >
15 > Suppose the old Prefix is BPREFIX and new one EPREFIX, I'll do it like
16 > this:
17 >
18 > mv $BPREFIX $EPREFIX
19 > ln -s $EPREFIX $BPREFIX
20 > export PORTAGE_OVERRIDE_EPREFIX=$EPREFIX
21 > emerge portage binutils-config
22 > emerge -e @system
23 > emerge -e @world
24 > sed -i "s,$BPREFIX,$EPREFIX,g" $EPREFIX/startprefix
25 > rm $BPREFIX
26
27 Actually, if one can keep symlink $BPREFIX, first two lines are enough (I'm using this setup)
28
29 --
30 Regards,
31 Konstantin

Replies

Subject Author
Re: [gentoo-alt] copy prefix to new directory / machine Michael Haubenwallner <haubi@g.o>