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.daafd832275fb9ef9031f804d0625ec9d8ba60ed.heroxbd@gentoo
1 commit: daafd832275fb9ef9031f804d0625ec9d8ba60ed
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 7 02:19: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=daafd832
7
8 scripts/bootstrap-prefix.sh: setup android overlay as staged RAP repo.
9
10 setup name databases.
11
12 scripts/bootstrap-prefix.sh | 36 +++++++++++++++++++++++++++++++++++-
13 1 file changed, 35 insertions(+), 1 deletion(-)
14
15 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
16 index ce4ccba..8b22f83 100755
17 --- a/scripts/bootstrap-prefix.sh
18 +++ b/scripts/bootstrap-prefix.sh
19 @@ -239,6 +239,34 @@ bootstrap_setup() {
20 } > "${ROOT}"/etc/portage/make.conf
21 fi
22
23 + if is-rap && [[ ! -f ${ROOT}/etc/portage/repos.conf ]] ; then
24 + cat >"${ROOT}"/etc/portage/repos.conf <<-EOF
25 + [DEFAULT]
26 + main-repo = gentoo
27 + eclass-overrides = rap
28 +
29 + [gentoo]
30 + location = ${ROOT}/usr/portage
31 + sync-type = rsync
32 + sync-uri = rsync://rsync.gentoo.org/gentoo-portage
33 +
34 + [rap]
35 + location = ${ROOT}/usr/portage-stage
36 + sync-type = git
37 + sync-uri = https://anongit.gentoo.org/git/proj/android.git
38 + auto-sync = no
39 + EOF
40 + fi
41 +
42 + if is-rap ; then
43 + [[ -f ${ROOT}/etc/passwd ]] || getent passwd > "${ROOT}"/etc/passwd || \
44 + ln -sf {,"${ROOT}"}/etc/passwd
45 + [[ -f ${ROOT}/etc/group ]] || getent group > "${ROOT}"/etc/group || \
46 + ln -sf {,"${ROOT}"}/etc/group
47 + [[ -f ${ROOT}/etc/resolv.conf ]] || ln -s {,"${ROOT}"}/etc/resolv.conf
48 + [[ -f ${ROOT}/etc/hosts ]] || cp {,"${ROOT}"}/etc/hosts
49 + fi
50 +
51 local linux=$(rapx linux-standalone linux)
52
53 case ${CHOST} in
54 @@ -421,6 +449,10 @@ bootstrap_tree() {
55 else
56 do_tree http://dev.gentoo.org/~grobian/distfiles prefix-overlay-${PV}.tar.bz2
57 fi
58 + if is-rap; then
59 + PORTDIR="${ROOT}/usr/portage-stage" \
60 + do_tree http://dev.gentoo.org/~heroxbd android-master.tar.bz2
61 + fi
62 }
63
64 bootstrap_startscript() {
65 @@ -530,7 +562,9 @@ bootstrap_portage() {
66
67 [[ -e "${ROOT}"/tmp/usr/portage ]] || ln -s "${PORTDIR}" "${ROOT}"/tmp/usr/portage
68
69 - if [[ -s ${PORTDIR}/profiles/repo_name ]]; then
70 + if is-rap; then
71 + cp -f "${ROOT}"/etc/portage/repos.conf "${ROOT}"/tmp/usr/share/portage/config/repos.conf
72 + elif [[ -s ${PORTDIR}/profiles/repo_name ]]; then
73 # sync portage's repos.conf with the tree being used
74 sed -i -e "s,gentoo_prefix,$(<"${PORTDIR}"/profiles/repo_name)," "${ROOT}"/tmp/usr/share/portage/config/repos.conf || return 1
75 fi