public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:rap0 commit in: scripts/
Date: Wed, 15 Jun 2016 11:32:46 +0000 (UTC)	[thread overview]
Message-ID: <1465990356.223cb3f0f4555a092212ef244547a59bc20fbbde.heroxbd@gentoo> (raw)

commit:     223cb3f0f4555a092212ef244547a59bc20fbbde
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 08:06:45 2016 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 11:32:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=223cb3f0

scripts/b-p.sh: calculate kernel version and select legacy profiles.

 scripts/bootstrap-prefix.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 6a1f3cd..90a7f03 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -10,6 +10,8 @@ einfo() { echo "* $*"; }
 is-rap() { [[ ${BASH_SOURCE} = *rap.sh ]]; }
 rapx() { is-rap && echo $1 || echo $2; }
 get_libdir() { portageq envvar LIBDIR_$(portageq envvar ABI) || echo lib; }
+kver() { uname -r|cut -d\- -f1|awk -F. '{for (i=1; i<=NF; i++){s+=lshift($i,(4-i)*8)};print s}'; }
+profile-legacy() { [[ $(kver) -ge 33955840 ]] || echo /legacy; }
 
 # prefer gtar over tar
 [[ x$(type -t gtar) == "xfile" ]] \
@@ -267,6 +269,7 @@ EOF
 			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)
 	fi
 
 	local linux=$(rapx linux-standalone linux)
@@ -296,22 +299,22 @@ EOF
 			profile="prefix/darwin/macos/10.$((rev - 4))/x64"
 			;;
 		i*86-pc-linux-gnu)
-			profile="prefix/${linux}/x86"
+			profile="prefix/${linux}/x86${legacy}"
 			;;
 		x86_64-pc-linux-gnu)
-			profile="prefix/${linux}/amd64"
+			profile="prefix/${linux}/amd64${legacy}"
 			;;
 		ia64-pc-linux-gnu)
-			profile="prefix/${linux}/ia64"
+			profile="prefix/${linux}/ia64${legacy}"
 			;;
 		powerpc-unknown-linux-gnu)
-			profile="prefix/${linux}/ppc"
+			profile="prefix/${linux}/ppc${legacy}"
 			;;
 		powerpc64-unknown-linux-gnu)
-			profile="prefix/${linux}/ppc64"
+			profile="prefix/${linux}/ppc64${legacy}"
 			;;
 		armv7l-pc-linux-gnu)
-			profile="prefix/${linux}/arm"
+			profile="prefix/${linux}/arm${legacy}"
 			;;
 		sparc-sun-solaris2.9)
 			profile="prefix/sunos/solaris/5.9/sparc"


             reply	other threads:[~2016-06-15 11:33 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 11:32 Benda XU [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-07-02  1:33 [gentoo-commits] repo/proj/prefix:rap0 commit in: scripts/ Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 10:12 [gentoo-commits] repo/proj/prefix:master " Benda XU
2016-06-15 11:32 ` [gentoo-commits] repo/proj/prefix:rap0 " Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  8:04 Benda XU
2016-06-15  7:58 [gentoo-commits] repo/proj/prefix:master " Benda XU
2016-06-15  8:04 ` [gentoo-commits] repo/proj/prefix:rap0 " Benda XU
2016-06-15  0:35 Benda XU
2016-06-15  0:35 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-10  3:29 Benda XU
2016-06-08  1:10 Benda XU
2016-06-08  1:10 Benda XU
2016-06-08  1:10 Benda XU
2016-06-08  1:10 Benda XU
2016-06-08  1:10 Benda XU
2016-06-04  7:29 Benda XU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465990356.223cb3f0f4555a092212ef244547a59bc20fbbde.heroxbd@gentoo \
    --to=heroxbd@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox