summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2020-01-27 10:38:20 +0800
committerBenda Xu <heroxbd@gentoo.org>2020-01-27 10:53:04 +0800
commit02451cdd8614f1072096608c49ae7796a6363819 (patch)
treea5161378646221114d4251f23ebfbdea14a3d652
parents/bootstrap-prefix.sh: no encryption while completing @system. (diff)
downloadprefix-02451cdd.tar.gz
prefix-02451cdd.tar.bz2
prefix-02451cdd.zip
s/bootstrap-prefix.sh: fake rsync to install linux-headers.
linux-headers starts to use rsync to do the installation. Replace it with a shell script to call cp instead. Closes: https://bugs.gentoo.org/699718 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
-rwxr-xr-xscripts/bootstrap-prefix.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 0669107fb5..3bb523071c 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1858,6 +1858,24 @@ bootstrap_stage3() {
> "${ROOT}"/usr/bin/perl
chmod +x "${ROOT}"/usr/bin/perl
fi
+
+ # Need rsync to for linux-headers installation
+ if [[ ! -x "${ROOT}"/usr/bin/rsync ]]; then
+ cat > "${ROOT}"/usr/bin/rsync <<-EOF
+ #!${ROOT}/bin/bash
+ while (( \$# > 0 )); do
+ case \$1 in
+ -*) shift; continue ;;
+ *) break ;;
+ esac
+ done
+ dst="\$2"/\$(basename \$1)
+ mkdir -p "\${dst}"
+ cp -rv \$1/* "\${dst}"/
+ EOF
+ chmod +x "${ROOT}"/usr/bin/rsync
+ fi
+
# Tell dynamic loader the path of libgcc_s.so of stage2
if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; then
mkdir -p "${ROOT}"/etc/ld.so.conf.d
@@ -1877,6 +1895,8 @@ bootstrap_stage3() {
with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1
grep -q 'apiversion=9999' "${ROOT}"/usr/bin/perl && \
rm "${ROOT}"/usr/bin/perl
+ grep -q 'esac' "${ROOT}"/usr/bin/rsync && \
+ rm "${ROOT}"/usr/bin/rsync
pkgs=(
sys-devel/binutils-config