Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/crossdev:master commit in: /
Date: Mon, 30 Sep 2013 00:21:16
Message-Id: 1380500412.1ed7a8be200dbe4575cc029212f2ee18d0bd5d74.vapier@gentoo
1 commit: 1ed7a8be200dbe4575cc029212f2ee18d0bd5d74
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 30 00:20:12 2013 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 30 00:20:12 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=1ed7a8be
7
8 crossdev: look up default crossdev overlays with `portageq get_repo_path`
9
10 This lets people name the overlays explicitly and crossdev will pick that
11 up by name.
12
13 URL: https://bugs.gentoo.org/486422
14 Reported-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
15 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
16
17 ---
18 crossdev | 17 ++++++++++++++---
19 1 file changed, 14 insertions(+), 3 deletions(-)
20
21 diff --git a/crossdev b/crossdev
22 index 8290c12..b5ba7b3 100755
23 --- a/crossdev
24 +++ b/crossdev
25 @@ -311,9 +311,20 @@ setup_portage_vars() {
26 : ${SEARCH_OVERLAYS:=${PORTDIR_OVERLAY}}
27
28 # see if user told us where to write things, otherwise
29 - # install our stuff to the first overlay in the list
30 - : ${CROSSDEV_OVERLAY:=${SEARCH_OVERLAYS}}
31 - CROSSDEV_OVERLAY=${CROSSDEV_OVERLAY%% *}
32 + # set up some repos.conf magic if possible. if not,
33 + # install our stuff to the first overlay in the list.
34 + if [[ -z ${CROSSDEV_OVERLAY} ]] ; then
35 + CROSSDEV_OVERLAY=${SEARCH_OVERLAYS%% *}
36 +
37 + local repo
38 + for repo in "cross-${CTARGET}" crossdev ; do
39 + repo=$(portageq get_repo_path / "${repo}")
40 + if [[ -n ${repo} ]] ; then
41 + CROSSDEV_OVERLAY=${repo}
42 + break
43 + fi
44 + done
45 + fi
46
47 # make sure we have a valid logdir
48 : ${PORT_LOGDIR:=/var/log/portage}