diff options
author | Fabian Groffen <grobian@gentoo.org> | 2019-01-09 11:46:37 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-01-09 14:49:00 +0100 |
commit | 6dc38bd8eaa983a25f061831f7921f3e562a6038 (patch) | |
tree | c26aaaad295521900b58565a089ff62a9b0dc00f | |
parent | dev-libs/libbsd: add for bug#674950 (diff) | |
download | prefix-6dc38bd8eaa983a25f061831f7921f3e562a6038.tar.gz prefix-6dc38bd8eaa983a25f061831f7921f3e562a6038.tar.bz2 prefix-6dc38bd8eaa983a25f061831f7921f3e562a6038.zip |
scripts/bootstrap-prefix: allow resume of stage3 after python-exec
Portage installs python-exec also in ROOT/tmp, which foobars the
manually bootstrapped python installation there, rendering it broken.
In a successful bootstrap this goes unnoticed, because the running
Portage (=Python) session installs Python later in the same merge
sequence. As such, after that emerge, the python from ROOT is picked
up. If we failed on one of the packages between python-exec and python,
however (~60 pkgs inbetween, including a compiler) we leave the setup in
a broken state.
Hence, prior to starting stage3, re-new the Python 2.7 symlinks to deal
with the scenario of resuming a broken off stage3. Since ROOT/tmp gets
removed shortly after Python gets installed in ROOT, it is fine that we
effectively kill python-exec in ROOT/tmp here.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index e547e6d1bf..9ce12729e3 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1670,6 +1670,15 @@ bootstrap_stage3() { fi fi + # if we resume this stage and python-exec was installed already in + # tmp, we basically made the system unusable, so remove python-exec + # here so we can use the python in tmp + for pef in python{,2} python{,2}-config ; do + rm -f "${ROOT}"/tmp/usr/bin/${pef} + [[ ${pef} == *-config ]] && ppf=-config || ppf= + ( cd "${ROOT}"/tmp/usr/bin && ln -s python2.7${ppf} ${pef} ) + done + get_libdir() { local l=$(portageq envvar LIBDIR_$(portageq envvar ABI) 2>/dev/null) [[ -z ${l} ]] && l=lib |