From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D3217138206 for ; Tue, 16 Jan 2018 03:30:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE45DE092F; Tue, 16 Jan 2018 03:30:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9485BE092F for ; Tue, 16 Jan 2018 03:30:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 50F7D335C50 for ; Tue, 16 Jan 2018 03:29:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1B5821B0 for ; Tue, 16 Jan 2018 03:29:51 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1516073226.dc8db0e9395c9d61a5f3a9783d8fc22f08a4b8fb.heroxbd@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: dc8db0e9395c9d61a5f3a9783d8fc22f08a4b8fb X-VCS-Branch: master Date: Tue, 16 Jan 2018 03:29:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e5eef9f1-5208-437b-86d3-6ce3e2ca9394 X-Archives-Hash: c78461f427dbd6eaff7a123364015e5e commit: dc8db0e9395c9d61a5f3a9783d8fc22f08a4b8fb Author: Benda Xu gentoo org> AuthorDate: Mon Jan 8 07:33:07 2018 +0000 Commit: Benda XU gentoo org> CommitDate: Tue Jan 16 03:27:06 2018 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=dc8db0e9 scripts/bootstrap-prefix.sh: use 17.0 profiles. scripts/bootstrap-prefix.sh | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 6217915656..7996ccdfae 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -294,7 +294,17 @@ bootstrap_setup() { # 2.6.32.1 -> 2*256^3 + 6*256^2 + 32 * 256 + 1 = 33955841 kver() { uname -r|cut -d\- -f1|awk -F. '{for (i=1; i<=NF; i++){s+=lshift($i,(4-i)*8)};print s}'; } # >=glibc-2.20 requires >=linux-2.6.32. - profile-legacy() { [[ $(kver) -ge 33955840 ]] || echo /legacy; } + profile-kernel() { + if [[ $(kver) -ge 50462720 ]] ; then # 3.2 + echo kernel-3.2+ + elif [[ $(kver) -ge 33955840 ]] ; then # 2.6.32 + echo kernel-2.6.32+ + elif [[ $(kver) -ge 33951744 ]] ; then # 2.6.16 + echo kernel-2.6.16+ + elif [[ $(kver) -ge 33947648 ]] ; then # 2.6 + echo kernel-2.6+ + fi + } local FS_INSENSITIVE=0 touch "${ROOT}"/FOO.$$ @@ -337,11 +347,11 @@ bootstrap_setup() { ln -sf {,"${ROOT}"}/etc/group [[ -f ${ROOT}/etc/resolv.conf ]] || ln -s {,"${ROOT}"}/etc/resolv.conf [[ -f ${ROOT}/etc/hosts ]] || cp {,"${ROOT}"}/etc/hosts - local legacy=$(profile-legacy) + local profile_linux=default/linux/ARCH/17.0/prefix/$(profile-kernel) + else + local profile_linux=prefix/linux/ARCH fi - local linux=$(rapx linux-standalone linux) - case ${CHOST} in powerpc-apple-darwin7) profile="prefix/darwin/macos/10.3" @@ -367,25 +377,26 @@ bootstrap_setup() { profile="prefix/darwin/macos/10.$((rev - 4))/x64" ;; i*86-pc-linux-gnu) - profile="prefix/${linux}/x86${legacy}" + profile=${profile_linux/ARCH/x86} ;; x86_64-pc-linux-gnu) - profile="prefix/${linux}/amd64${legacy}" + profile=${profile_linux/ARCH/amd64} + profile=${profile/prefix/no-multilib/prefix} ;; ia64-pc-linux-gnu) - profile="prefix/${linux}/ia64${legacy}" + profile=${profile_linux/ARCH/ia64} ;; powerpc-unknown-linux-gnu) - profile="prefix/${linux}/ppc${legacy}" + profile=${profile_linux/ARCH/powerpc/ppc} ;; powerpc64-unknown-linux-gnu) - profile="prefix/${linux}/ppc64${legacy}" + profile=${profile_linux/ARCH/powerpc/ppc64} ;; aarch64-unknown-linux-gnu) - profile="prefix/${linux}/arm64${legacy}" + profile=${profile_linux/ARCH/arm64} ;; armv7l-pc-linux-gnu) - profile="prefix/${linux}/arm${legacy}" + profile=${profile_linux/ARCH/arm} ;; sparc-sun-solaris2.9) profile="prefix/sunos/solaris/5.9/sparc" @@ -447,6 +458,11 @@ bootstrap_setup() { einfo "Your profile is set to ${fullprofile}." fi + is-rap && cat >> "${ROOT}"/etc/portage/make.profile/make.defaults <<-'EOF' + # For baselayout-prefix in stage2 only. + ACCEPT_KEYWORDS="~${ARCH}-linux" + EOF + # Use package.use to disable in the portage tree to be shared between # stage2 and stage3. The hack will be undone during tree sync in stage3. cat >> "${ROOT}"/etc/portage/make.profile/package.use <<-EOF