Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: cros_workon

Issue 6409031: cros_workon: use portageq instead of sourcing make.conf (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros_workon
diff --git a/cros_workon b/cros_workon
index 0c7ded12ad3995f45c00df04a468ac49efb2e2e2..5d890bd4884a8b469b91f539e5da772130c4dfb0 100755
--- a/cros_workon
+++ b/cros_workon
@@ -58,12 +58,14 @@ if [ -n "${FLAGS_board}" ]; then
BOARD_DIR=/build/"${FLAGS_board}" # --board specified
EQUERYCMD=equery-"${FLAGS_board}"
EBUILDCMD=ebuild-"${FLAGS_board}"
+ PORTAGEQCMD=portageq-"${FLAGS_board}"
BOARD_STR="${FLAGS_board}"
BOARD_KEYWORD="$(portageq-${FLAGS_board} envvar ARCH)"
else
BOARD_DIR="" # --host specified
EQUERYCMD=equery
EBUILDCMD=ebuild
+ PORTAGEQCMD=portageq
BOARD_STR="host"
BOARD_KEYWORD="$(portageq envvar ARCH)"
fi
@@ -98,13 +100,10 @@ fi
find_keyword_workon_ebuilds() {
keyword="${1}"
- pushd "${BOARD_DIR}"/etc/ 1> /dev/null
- source make.conf
- popd 1> /dev/null
- local CROS_OVERLAYS="${PORTDIR_OVERLAY}"
+ local cros_overlays=$("${PORTAGEQCMD}" envvar PORTDIR_OVERLAY)
# NOTE: overlay may be a symlink, and we have to use ${overlay}/
- for overlay in ${CROS_OVERLAYS}; do
+ for overlay in ${cros_overlays}; do
# only look up ebuilds named 9999 to eliminate duplicates
find ${overlay}/ -name '*9999.ebuild' | \
xargs grep -l "inherit.*cros-workon" | \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698