1 |
commit: 02451cdd8614f1072096608c49ae7796a6363819 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 27 02:38:20 2020 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 27 02:53:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=02451cdd |
7 |
|
8 |
s/bootstrap-prefix.sh: fake rsync to install linux-headers. |
9 |
|
10 |
linux-headers starts to use rsync to do the installation. Replace |
11 |
it with a shell script to call cp instead. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/699718 |
14 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
15 |
|
16 |
scripts/bootstrap-prefix.sh | 20 ++++++++++++++++++++ |
17 |
1 file changed, 20 insertions(+) |
18 |
|
19 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
20 |
index 0669107fb5..3bb523071c 100755 |
21 |
--- a/scripts/bootstrap-prefix.sh |
22 |
+++ b/scripts/bootstrap-prefix.sh |
23 |
@@ -1858,6 +1858,24 @@ bootstrap_stage3() { |
24 |
> "${ROOT}"/usr/bin/perl |
25 |
chmod +x "${ROOT}"/usr/bin/perl |
26 |
fi |
27 |
+ |
28 |
+ # Need rsync to for linux-headers installation |
29 |
+ if [[ ! -x "${ROOT}"/usr/bin/rsync ]]; then |
30 |
+ cat > "${ROOT}"/usr/bin/rsync <<-EOF |
31 |
+ #!${ROOT}/bin/bash |
32 |
+ while (( \$# > 0 )); do |
33 |
+ case \$1 in |
34 |
+ -*) shift; continue ;; |
35 |
+ *) break ;; |
36 |
+ esac |
37 |
+ done |
38 |
+ dst="\$2"/\$(basename \$1) |
39 |
+ mkdir -p "\${dst}" |
40 |
+ cp -rv \$1/* "\${dst}"/ |
41 |
+ EOF |
42 |
+ chmod +x "${ROOT}"/usr/bin/rsync |
43 |
+ fi |
44 |
+ |
45 |
# Tell dynamic loader the path of libgcc_s.so of stage2 |
46 |
if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; then |
47 |
mkdir -p "${ROOT}"/etc/ld.so.conf.d |
48 |
@@ -1877,6 +1895,8 @@ bootstrap_stage3() { |
49 |
with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1 |
50 |
grep -q 'apiversion=9999' "${ROOT}"/usr/bin/perl && \ |
51 |
rm "${ROOT}"/usr/bin/perl |
52 |
+ grep -q 'esac' "${ROOT}"/usr/bin/rsync && \ |
53 |
+ rm "${ROOT}"/usr/bin/rsync |
54 |
|
55 |
pkgs=( |
56 |
sys-devel/binutils-config |