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: Wed, 30 May 2012 15:28:38
Message-Id: 1338323375.a90771cb146880e903e5f74713cb879acacccc64.vapier@gentoo
1 commit: a90771cb146880e903e5f74713cb879acacccc64
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 29 20:27:41 2012 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue May 29 20:29:35 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=a90771cb
7
8 crossdev: add --init-target flag for just preparing things
9
10 To help out external tooling, add a --init-target flag that tells
11 crossdev to only setup its /etc/portage (and such) settings without
12 actually running emerge.
13
14 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
15
16 ---
17 crossdev | 9 +++++++--
18 1 files changed, 7 insertions(+), 2 deletions(-)
19
20 diff --git a/crossdev b/crossdev
21 index bd2f505..acd6bf2 100755
22 --- a/crossdev
23 +++ b/crossdev
24 @@ -78,6 +78,7 @@ Stage Options:
25
26 External Tooling Options:
27 ${GOOD}--show-target-cfg${NORMAL} Display target settings that crossdev will use
28 + ${GOOD}--init-target${NORMAL} Setup config/overlay/etc... files only
29
30 Extra Fun (must be run after above stages):
31 ${GOOD}--ex-only${NORMAL} Skip the stage steps above
32 @@ -478,6 +479,7 @@ FORCE="no"
33 SET_X="no"
34 SHOW_FAIL_LOG="no"
35 SHOW_TARGET_CFG="no"
36 +INIT_TARGET_ONLY="false"
37
38 while [[ $# -gt 0 ]] ; do
39 case $1 in
40 @@ -512,6 +514,7 @@ while [[ $# -gt 0 ]] ; do
41 -f|--force) FORCE="yes";;
42 -x) SET_X="yes";;
43 --show-target-cfg) SHOW_TARGET_CFG="yes";;
44 + --init-target) INIT_TARGET_ONLY="yes";;
45 --show-fail-log) SHOW_FAIL_LOG="yes";;
46 -P|--portage) UOPTS="${UOPTS} $2"; shift;;
47 -b|-d|-p|-v|-q) UOPTS="${UOPTS} $1";;
48 @@ -943,6 +946,10 @@ doemerge() {
49
50 [[ ${pn} == "[none]" ]] && return 0
51
52 + set_use ${pn} ${USE} $( [[ ${MULTILIB_USE} == "no" ]] && echo - )multilib
53 +
54 + [[ ${INIT_TARGET_ONLY} == "yes" ]] && return 0
55 +
56 local logfile=${PORT_LOGDIR}/${category}
57 [[ -z $2 ]] \
58 && logfile=${logfile}-${pn}.log \
59 @@ -951,8 +958,6 @@ doemerge() {
60 einfo "Log: ${logfile}"
61 ebegin "Emerging cross-${2:-${pn}}"
62
63 - set_use ${pn} ${USE} $( [[ ${MULTILIB_USE} == "no" ]] && echo - )multilib
64 -
65 if has -v ${UOPTS} || has -p ${UOPTS} || has -vp ${UOPTS} || has -pv ${UOPTS} ; then
66 SHOW_FAIL_LOG="no"
67 emerge ${atom} ${EOPTS} 2>&1 | tee "${logfile}"