OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script moves ebuilds between 'stable' and 'live' states. | 7 # This script moves ebuilds between 'stable' and 'live' states. |
8 # By default 'stable' ebuilds point at and build from source at the | 8 # By default 'stable' ebuilds point at and build from source at the |
9 # last known good commit. Moving an ebuild to 'live' (via cros_workon start) | 9 # last known good commit. Moving an ebuild to 'live' (via cros_workon start) |
10 # is intended to support development. The current source tip is fetched, | 10 # is intended to support development. The current source tip is fetched, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 sudo mkdir -p "${KEYWORDS_DIR}" "${UNMASK_DIR}" || \ | 69 sudo mkdir -p "${KEYWORDS_DIR}" "${UNMASK_DIR}" || \ |
70 die "mkdir -p ${KEYWORDS_DIR} ${UNMASK_DIR}" | 70 die "mkdir -p ${KEYWORDS_DIR} ${UNMASK_DIR}" |
71 sudo touch "${KEYWORDS_FILE}" "${UNMASK_FILE}" || \ | 71 sudo touch "${KEYWORDS_FILE}" "${UNMASK_FILE}" || \ |
72 die "touch ${KEYWORDS_FILE} ${UNMASK_FILE}" | 72 die "touch ${KEYWORDS_FILE} ${UNMASK_FILE}" |
73 | 73 |
74 # Canonicalize package name to category/package. | 74 # Canonicalize package name to category/package. |
75 canonicalize_name () { | 75 canonicalize_name () { |
76 local pkgfile | 76 local pkgfile |
77 local pkgname | 77 local pkgname |
78 | 78 |
79 if ! pkgfile=$(${EQUERYCMD} which $1); then | 79 if ! pkgfile=$(ACCEPT_KEYWORDS="**" ${EQUERYCMD} which $1); then |
80 warn "error looking up package $1" 1>&2 | 80 warn "error looking up package $1" 1>&2 |
81 return 1 | 81 return 1 |
82 fi | 82 fi |
83 | 83 |
84 pkgname=$(\ | 84 pkgname=$(\ |
85 echo "${pkgfile}" |awk -F '/' '{ print $(NF-2) "/" $(NF-1) }') | 85 echo "${pkgfile}" |awk -F '/' '{ print $(NF-2) "/" $(NF-1) }') |
86 | 86 |
87 if ! grep -q "cros-workon" ${pkgfile}; then | 87 if ! grep -q "cros-workon" ${pkgfile}; then |
88 warn "${pkgname} is not a cros-workon package" 1>&2 | 88 warn "${pkgname} is not a cros-workon package" 1>&2 |
89 return 1 | 89 return 1 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 esac | 223 esac |
224 fi | 224 fi |
225 | 225 |
226 case ${WORKON_CMD} in | 226 case ${WORKON_CMD} in |
227 start) ebuild_to_live "${ATOM_LIST}" ;; | 227 start) ebuild_to_live "${ATOM_LIST}" ;; |
228 stop) ebuild_to_stable "${ATOM_LIST}" ;; | 228 stop) ebuild_to_stable "${ATOM_LIST}" ;; |
229 list) [ ${FLAGS_all} = "${FLAGS_FALSE}" ] && show_live_ebuilds || show_worko
n_ebuilds ;; | 229 list) [ ${FLAGS_all} = "${FLAGS_FALSE}" ] && show_live_ebuilds || show_worko
n_ebuilds ;; |
230 iterate)ebuild_iterate "${ATOM_LIST}" ;; | 230 iterate)ebuild_iterate "${ATOM_LIST}" ;; |
231 *) die "invalid cros_workon command" ;; | 231 *) die "invalid cros_workon command" ;; |
232 esac | 232 esac |
OLD | NEW |