Gentoo Archives: gentoo-commits

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