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: Thu, 07 Jul 2016 02:41:29
Message-Id: 1467859257.2b0664f542776c2eb10019515b97e5e3625b53d8.heroxbd@gentoo
1 commit: 2b0664f542776c2eb10019515b97e5e3625b53d8
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 7 01:39:28 2016 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 7 02:40:57 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2b0664f5
7
8 scripts/bootstrap-prefix.sh: rap helpers for profiles and portage tree.
9
10 scripts/bootstrap-prefix.sh | 22 +++++++++++++++-------
11 1 file changed, 15 insertions(+), 7 deletions(-)
12
13 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
14 index a171e97..438e0be 100755
15 --- a/scripts/bootstrap-prefix.sh
16 +++ b/scripts/bootstrap-prefix.sh
17 @@ -7,6 +7,9 @@ trap 'exit 1' TERM KILL INT QUIT ABRT
18 # some basic output functions
19 eerror() { echo "!!! $*" 1>&2; }
20 einfo() { echo "* $*"; }
21 +# RAP (libc) mode is triggered if the script is renamed to bootstrap-rap.sh.
22 +is-rap() { [[ ${BASH_SOURCE} = *rap.sh ]]; }
23 +rapx() { is-rap && echo $1 || echo $2; }
24
25 # prefer gtar over tar
26 [[ x$(type -t gtar) == "xfile" ]] \
27 @@ -235,6 +238,8 @@ bootstrap_setup() {
28 echo 'FETCHCOMMAND="bash -c \"echo I need \${FILE} from \${URI} in \${DISTDIR}; read\""'
29 } > "${ROOT}"/etc/portage/make.conf
30 fi
31 +
32 + local linux=$(rapx linux-standalone linux)
33
34 case ${CHOST} in
35 powerpc-apple-darwin7)
36 @@ -261,22 +266,22 @@ bootstrap_setup() {
37 profile="prefix/darwin/macos/10.$((rev - 4))/x64"
38 ;;
39 i*86-pc-linux-gnu)
40 - profile="prefix/linux/x86"
41 + profile="prefix/${linux}/x86"
42 ;;
43 x86_64-pc-linux-gnu)
44 - profile="prefix/linux/amd64"
45 + profile="prefix/${linux}/amd64"
46 ;;
47 ia64-pc-linux-gnu)
48 - profile="prefix/linux/ia64"
49 + profile="prefix/${linux}/ia64"
50 ;;
51 powerpc-unknown-linux-gnu)
52 - profile="prefix/linux/ppc"
53 + profile="prefix/${linux}/ppc"
54 ;;
55 powerpc64-unknown-linux-gnu)
56 - profile="prefix/linux/ppc64"
57 + profile="prefix/${linux}/ppc64"
58 ;;
59 armv7l-pc-linux-gnu)
60 - profile="prefix/linux/arm"
61 + profile="prefix/${linux}/arm"
62 ;;
63 sparc-sun-solaris2.9)
64 profile="prefix/sunos/solaris/5.9/sparc"
65 @@ -408,6 +413,8 @@ do_tree() {
66 }
67
68 bootstrap_tree() {
69 + # RAP uses the latest gentoo main repo snapshot to bootstrap.
70 + is-rap && LATEST_TREE_YES=1
71 local PV="20160614"
72 if [[ -n ${LATEST_TREE_YES} ]]; then
73 do_tree "${SNAPSHOT_URL}" portage-latest.tar.bz2
74 @@ -2405,9 +2412,10 @@ export PORTDIR=${PORTDIR:-"${ROOT}/usr/portage"}
75 export DISTDIR=${DISTDIR:-"${PORTDIR}/distfiles"}
76 PORTAGE_TMPDIR=${PORTAGE_TMPDIR:-${ROOT}/tmp/var/tmp}
77 DISTFILES_URL=${DISTFILES_URL:-"http://dev.gentoo.org/~grobian/distfiles"}
78 -SNAPSHOT_URL=${SNAPSHOT_URL:-"http://rsync.prefix.bitzolder.nl/snapshots"}
79 GNU_URL=${GNU_URL:="http://ftp.gnu.org/gnu"}
80 GENTOO_MIRRORS=${GENTOO_MIRRORS:="http://distfiles.gentoo.org"}
81 +SNAPSHOT_HOST=$(rapx ${GENTOO_MIRRORS} http://rsync.prefix.bitzolder.nl)
82 +SNAPSHOT_URL=${SNAPSHOT_URL:-"${SNAPSHOT_HOST}/snapshots"}
83 GCC_APPLE_URL="http://www.opensource.apple.com/darwinsource/tarballs/other"
84
85 export MAKE CONFIG_SHELL