Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/
Date: Tue, 16 Jan 2018 03:30:16
Message-Id: 1516073226.dc8db0e9395c9d61a5f3a9783d8fc22f08a4b8fb.heroxbd@gentoo
1 commit: dc8db0e9395c9d61a5f3a9783d8fc22f08a4b8fb
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 8 07:33:07 2018 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 16 03:27:06 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=dc8db0e9
7
8 scripts/bootstrap-prefix.sh: use 17.0 profiles.
9
10 scripts/bootstrap-prefix.sh | 38 +++++++++++++++++++++++++++-----------
11 1 file changed, 27 insertions(+), 11 deletions(-)
12
13 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
14 index 6217915656..7996ccdfae 100755
15 --- a/scripts/bootstrap-prefix.sh
16 +++ b/scripts/bootstrap-prefix.sh
17 @@ -294,7 +294,17 @@ bootstrap_setup() {
18 # 2.6.32.1 -> 2*256^3 + 6*256^2 + 32 * 256 + 1 = 33955841
19 kver() { uname -r|cut -d\- -f1|awk -F. '{for (i=1; i<=NF; i++){s+=lshift($i,(4-i)*8)};print s}'; }
20 # >=glibc-2.20 requires >=linux-2.6.32.
21 - profile-legacy() { [[ $(kver) -ge 33955840 ]] || echo /legacy; }
22 + profile-kernel() {
23 + if [[ $(kver) -ge 50462720 ]] ; then # 3.2
24 + echo kernel-3.2+
25 + elif [[ $(kver) -ge 33955840 ]] ; then # 2.6.32
26 + echo kernel-2.6.32+
27 + elif [[ $(kver) -ge 33951744 ]] ; then # 2.6.16
28 + echo kernel-2.6.16+
29 + elif [[ $(kver) -ge 33947648 ]] ; then # 2.6
30 + echo kernel-2.6+
31 + fi
32 + }
33
34 local FS_INSENSITIVE=0
35 touch "${ROOT}"/FOO.$$
36 @@ -337,11 +347,11 @@ bootstrap_setup() {
37 ln -sf {,"${ROOT}"}/etc/group
38 [[ -f ${ROOT}/etc/resolv.conf ]] || ln -s {,"${ROOT}"}/etc/resolv.conf
39 [[ -f ${ROOT}/etc/hosts ]] || cp {,"${ROOT}"}/etc/hosts
40 - local legacy=$(profile-legacy)
41 + local profile_linux=default/linux/ARCH/17.0/prefix/$(profile-kernel)
42 + else
43 + local profile_linux=prefix/linux/ARCH
44 fi
45
46 - local linux=$(rapx linux-standalone linux)
47 -
48 case ${CHOST} in
49 powerpc-apple-darwin7)
50 profile="prefix/darwin/macos/10.3"
51 @@ -367,25 +377,26 @@ bootstrap_setup() {
52 profile="prefix/darwin/macos/10.$((rev - 4))/x64"
53 ;;
54 i*86-pc-linux-gnu)
55 - profile="prefix/${linux}/x86${legacy}"
56 + profile=${profile_linux/ARCH/x86}
57 ;;
58 x86_64-pc-linux-gnu)
59 - profile="prefix/${linux}/amd64${legacy}"
60 + profile=${profile_linux/ARCH/amd64}
61 + profile=${profile/prefix/no-multilib/prefix}
62 ;;
63 ia64-pc-linux-gnu)
64 - profile="prefix/${linux}/ia64${legacy}"
65 + profile=${profile_linux/ARCH/ia64}
66 ;;
67 powerpc-unknown-linux-gnu)
68 - profile="prefix/${linux}/ppc${legacy}"
69 + profile=${profile_linux/ARCH/powerpc/ppc}
70 ;;
71 powerpc64-unknown-linux-gnu)
72 - profile="prefix/${linux}/ppc64${legacy}"
73 + profile=${profile_linux/ARCH/powerpc/ppc64}
74 ;;
75 aarch64-unknown-linux-gnu)
76 - profile="prefix/${linux}/arm64${legacy}"
77 + profile=${profile_linux/ARCH/arm64}
78 ;;
79 armv7l-pc-linux-gnu)
80 - profile="prefix/${linux}/arm${legacy}"
81 + profile=${profile_linux/ARCH/arm}
82 ;;
83 sparc-sun-solaris2.9)
84 profile="prefix/sunos/solaris/5.9/sparc"
85 @@ -447,6 +458,11 @@ bootstrap_setup() {
86 einfo "Your profile is set to ${fullprofile}."
87 fi
88
89 + is-rap && cat >> "${ROOT}"/etc/portage/make.profile/make.defaults <<-'EOF'
90 + # For baselayout-prefix in stage2 only.
91 + ACCEPT_KEYWORDS="~${ARCH}-linux"
92 + EOF
93 +
94 # Use package.use to disable in the portage tree to be shared between
95 # stage2 and stage3. The hack will be undone during tree sync in stage3.
96 cat >> "${ROOT}"/etc/portage/make.profile/package.use <<-EOF