Gentoo Archives: gentoo-alt

From: heroxbd@×××××.com
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] copy prefix to new directory / machine
Date: Wed, 16 Oct 2013 03:49:26
Message-Id: 86zjq9zxhf.fsf@moguhome00.in.awa.tohoku.ac.jp
In Reply to: [gentoo-alt] copy prefix to new directory / machine by Christopher Friedt
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

Replies

Subject Author
Re: [gentoo-alt] copy prefix to new directory / machine Konstantin Tokarev <annulen@××××××.ru>
Re: [gentoo-alt] copy prefix to new directory / machine Greg Turner <gmt@×××××.us>