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 667C81381F3 for ; Mon, 30 Sep 2013 00:21:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2FB8E0F4F; Mon, 30 Sep 2013 00:21:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 69386E0F4F for ; Mon, 30 Sep 2013 00:21:12 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 402B933EDB1 for ; Mon, 30 Sep 2013 00:21:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E581BE5309 for ; Mon, 30 Sep 2013 00:21:09 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1380500412.1ed7a8be200dbe4575cc029212f2ee18d0bd5d74.vapier@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: / X-VCS-Repository: proj/crossdev X-VCS-Files: crossdev X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 1ed7a8be200dbe4575cc029212f2ee18d0bd5d74 X-VCS-Branch: master Date: Mon, 30 Sep 2013 00:21:09 +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: 8644bcdf-c382-4e55-be90-cba8145270c1 X-Archives-Hash: cb1536ae802738d4ca6ccab98d000179 commit: 1ed7a8be200dbe4575cc029212f2ee18d0bd5d74 Author: Mike Frysinger gentoo org> AuthorDate: Mon Sep 30 00:20:12 2013 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Sep 30 00:20:12 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=1ed7a8be crossdev: look up default crossdev overlays with `portageq get_repo_path` This lets people name the overlays explicitly and crossdev will pick that up by name. URL: https://bugs.gentoo.org/486422 Reported-by: Alon Bar-Lev gentoo.org> Signed-off-by: Mike Frysinger gentoo.org> --- crossdev | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/crossdev b/crossdev index 8290c12..b5ba7b3 100755 --- a/crossdev +++ b/crossdev @@ -311,9 +311,20 @@ setup_portage_vars() { : ${SEARCH_OVERLAYS:=${PORTDIR_OVERLAY}} # see if user told us where to write things, otherwise - # install our stuff to the first overlay in the list - : ${CROSSDEV_OVERLAY:=${SEARCH_OVERLAYS}} - CROSSDEV_OVERLAY=${CROSSDEV_OVERLAY%% *} + # set up some repos.conf magic if possible. if not, + # install our stuff to the first overlay in the list. + if [[ -z ${CROSSDEV_OVERLAY} ]] ; then + CROSSDEV_OVERLAY=${SEARCH_OVERLAYS%% *} + + local repo + for repo in "cross-${CTARGET}" crossdev ; do + repo=$(portageq get_repo_path / "${repo}") + if [[ -n ${repo} ]] ; then + CROSSDEV_OVERLAY=${repo} + break + fi + done + fi # make sure we have a valid logdir : ${PORT_LOGDIR:=/var/log/portage}