From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2ECB1138285 for ; Fri, 27 May 2016 10:54:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87128224042; Fri, 27 May 2016 10:54:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2E632224042 for ; Fri, 27 May 2016 10:54:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F340A340D09 for ; Fri, 27 May 2016 10:53:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7DC7E13FE for ; Fri, 27 May 2016 10:53:52 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1464270941.eb97b1ce2322d18a749aaf958f227a2c3f8cdf20.heroxbd@gentoo> Subject: [gentoo-commits] repo/proj/prefix:script-rap commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: eb97b1ce2322d18a749aaf958f227a2c3f8cdf20 X-VCS-Branch: script-rap Date: Fri, 27 May 2016 10:53:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 41a41347-0709-40f4-9ca4-33da61b1d6f5 X-Archives-Hash: 045d425ea3643384e8d8d5bb5369faf8 commit: eb97b1ce2322d18a749aaf958f227a2c3f8cdf20 Author: Benda Xu gentoo org> AuthorDate: Mon May 23 10:14:33 2016 +0000 Commit: Benda XU gentoo org> CommitDate: Thu May 26 13:55:41 2016 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=eb97b1ce scripts/bootstrap-prefix.sh: setup android overlay as staged RAP repo. setup name databases. scripts/bootstrap-prefix.sh | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 4c2c892..86056e6 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -234,6 +234,33 @@ bootstrap_setup() { } > "${ROOT}"/etc/portage/make.conf fi + if is-rap && [[ ! -f ${ROOT}/etc/portage/repos.conf ]] ; then + cat <"${ROOT}"/etc/portage/repos.conf +[DEFAULT] +main-repo = gentoo +eclass-overrides = rap + +[gentoo] +location = ${ROOT}/usr/portage +sync-type = rsync +sync-uri = rsync://rsync.gentoo.org/gentoo-portage + +[rap] +location = ${ROOT}/usr/portage-stage +sync-type = webrsync +sync-uri = https://gitweb.gentoo.org/proj/android.git/snapshot/android-master.tar.bz2 +EOF + fi + + if is-rap ; then + [[ -f ${ROOT}/etc/passwd ]] || getent passwd > "${ROOT}"/etc/passwd || \ + ln -sf {,"${ROOT}"}/etc/passwd + [[ -f ${ROOT}/etc/group ]] || getent group > "${ROOT}"/etc/group || \ + ln -sf {,"${ROOT}"}/etc/group + [[ -f ${ROOT}/etc/resolv.conf ]] || ln -s {,"${ROOT}"}/etc/resolv.conf + [[ -f ${ROOT}/etc/hosts ]] || ln -s {,"${ROOT}"}/etc/hosts + fi + local linux=$(rapx linux-standalone linux) case ${CHOST} in @@ -415,6 +442,10 @@ bootstrap_tree() { else do_tree http://dev.gentoo.org/~grobian/distfiles prefix-overlay-${PV}.tar.bz2 fi + if is-rap; then + PORTDIR="${ROOT}/usr/portage-stage" \ + do_tree https://gitweb.gentoo.org/proj/android.git/snapshot android-master.tar.bz2 + fi } bootstrap_startscript() { @@ -524,7 +555,9 @@ bootstrap_portage() { [[ -e "${ROOT}"/tmp/usr/portage ]] || ln -s "${PORTDIR}" "${ROOT}"/tmp/usr/portage - if [[ -s ${PORTDIR}/profiles/repo_name ]]; then + if is-rap; then + cp -f "${ROOT}"/etc/portage/repos.conf "${ROOT}"/tmp/usr/share/portage/config/repos.conf + elif [[ -s ${PORTDIR}/profiles/repo_name ]]; then # sync portage's repos.conf with the tree being used sed -i -e "s,gentoo_prefix,$(<"${PORTDIR}"/profiles/repo_name)," "${ROOT}"/tmp/usr/share/portage/config/repos.conf || return 1 fi