diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-09-29 20:20:12 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-09-29 20:20:12 -0400 |
commit | 1ed7a8be200dbe4575cc029212f2ee18d0bd5d74 (patch) | |
tree | 2810972fa89dd51101b31a074088ad502bcd22a3 | |
parent | crossdev: avr: disable go too (diff) | |
download | crossdev-1ed7a8be200dbe4575cc029212f2ee18d0bd5d74.tar.gz crossdev-1ed7a8be200dbe4575cc029212f2ee18d0bd5d74.tar.bz2 crossdev-1ed7a8be200dbe4575cc029212f2ee18d0bd5d74.zip |
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 <alonbl@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | crossdev | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -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} |