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

Unified Diff: cros_workon

Issue 3400001: cros_workon: redefine the concept of a "workon" package list to depend on the board (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: . Created 10 years, 3 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 | lib/cros_workon_common.sh » ('j') | 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 9720079a8cd466a6304fd5e68ea4a65d042398ff..74285cd259dd761a495f8b27fabc0c0e0001efa8 100755
--- a/cros_workon
+++ b/cros_workon
@@ -60,11 +60,13 @@ if [ -n "${FLAGS_board}" ]; then
EQUERYCMD=equery-"${FLAGS_board}"
EBUILDCMD=ebuild-"${FLAGS_board}"
BOARD_STR="${FLAGS_board}"
+ BOARD_KEYWORD="$(portageq-${FLAGS_board} envvar ARCH)"
else
BOARD_DIR="" # --host specified
EQUERYCMD=equery
EBUILDCMD=ebuild
BOARD_STR="host"
+ BOARD_KEYWORD="$(portageq envvar ARCH)"
fi
WORKON_DIR=${CHROOT_TRUNK_DIR}/.config/cros_workon
@@ -95,7 +97,7 @@ canonicalize_name () {
local pkgfile
local pkgname
- if ! pkgfile=$(ACCEPT_KEYWORDS="**" ${EQUERYCMD} which $1); then
+ if ! pkgfile=$(ACCEPT_KEYWORDS="~${BOARD_KEYWORD}" ${EQUERYCMD} which $1); then
warn "error looking up package $1" 1>&2
return 1
fi
@@ -249,7 +251,7 @@ ebuild_iterate() {
# --all makes commands operate on different lists
if [ ${FLAGS_all} = "${FLAGS_TRUE}" ]; then
case ${WORKON_CMD} in
- start) ATOM_LIST=$(show_workon_ebuilds);;
+ start) ATOM_LIST=$(show_workon_ebuilds ${BOARD_KEYWORD});;
stop|iterate) ATOM_LIST=$(show_live_ebuilds);;
list) ;;
*) die "--all is invalid for the given command";;
@@ -270,7 +272,7 @@ fi
case ${WORKON_CMD} in
start) ebuild_to_live "${ATOM_LIST}" ;;
stop) ebuild_to_stable "${ATOM_LIST}" ;;
- list) [ ${FLAGS_all} = "${FLAGS_FALSE}" ] && show_live_ebuilds || show_workon_ebuilds ;;
+ list) [ ${FLAGS_all} = "${FLAGS_FALSE}" ] && show_live_ebuilds || show_workon_ebuilds ${BOARD_KEYWORD} ;;
iterate)ebuild_iterate "${ATOM_LIST}" ;;
*) die "$(basename $0): command '${WORKON_CMD}' not recognized" ;;
esac
« no previous file with comments | « no previous file | lib/cros_workon_common.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698