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