summaryrefslogtreecommitdiff
path: root/licensing
diff options
context:
space:
mode:
authorYu-Ju Hong <yjhong@chromium.org>2014-01-03 17:08:26 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-17 07:30:35 +0000
commitdd9bb2bc31e54b6aa62ff46b9b000483673d36a3 (patch)
tree106af6ebad27da4ebc0001400579015b1af68ca8 /licensing
parentc09cc899eb468c0431747a35b2bac8b87ee202ca (diff)
downloadchromite-dd9bb2bc31e54b6aa62ff46b9b000483673d36a3.tar.gz
Add GetSysroot function in cros_build_lib to return sysroot of a board
Many existing scripts use '/build/board' directly as the sysroot. We should unify this and have a function that returns the sysroot of a board. BUG=None TEST=`buildbot/run_tests` passes Change-Id: I13bc130c6f156f70a09cbed9d38ff82204cca0d7 Reviewed-on: https://chromium-review.googlesource.com/182923 Reviewed-by: Yu-Ju Hong <yjhong@chromium.org> Commit-Queue: Yu-Ju Hong <yjhong@chromium.org> Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Diffstat (limited to 'licensing')
-rw-r--r--licensing/licenses.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/licensing/licenses.py b/licensing/licenses.py
index ab7802d3b..5894b270e 100644
--- a/licensing/licenses.py
+++ b/licensing/licenses.py
@@ -76,7 +76,7 @@ The detailed process is listed below.
"Edit issue". (A quick reference:
http://www.chromium.org/developers/quick-reference)
-* After receiving LGTMs, commit your change with 'svn commit'.
+* After receiving LGTMs, commit your change with 'gcl commit <change_name>'.
If you don't get this in before the freeze window, it'll need to be merged into
the branch being released, which is done by adding a Merge-Requested label to
@@ -703,8 +703,9 @@ being scraped currently).""",
logging.debug("%s -> %s", " ".join(args), path)
if not path:
raise AssertionError('GetEbuildPath for %s failed.\n'
- 'Is your tree clean? Delete /build/%s and rebuild' %
- (self.name, self.board))
+ 'Is your tree clean? Delete %s and rebuild' %
+ (self.name,
+ cros_build_lib.GetSysroot(board=self.board)))
if not os.access(path, os.F_OK):
raise AssertionError("Can't access %s", path)
@@ -712,8 +713,9 @@ being scraped currently).""",
self.ebuild_dir = os.path.dirname(path)
self.ebuild_path = path
- args = ['portageq-%s' % self.board, 'metadata', '/build/%s' % self.board,
- 'ebuild', self.fullnamerev, 'HOMEPAGE', 'LICENSE', 'DESCRIPTION']
+ args = ['portageq-%s' % self.board, 'metadata',
+ cros_build_lib.GetSysroot(board=self.board), 'ebuild',
+ self.fullnamerev, 'HOMEPAGE', 'LICENSE', 'DESCRIPTION']
lines = cros_build_lib.RunCommand(args, print_cmd=debug,
redirect_stdout=True).output.splitlines()
# Runs:
@@ -1210,7 +1212,8 @@ def main(args):
if not output_file and not packages_mode:
logging.warning('No output file is specified.')
- builddir = "/build/%s/tmp/portage" % board
+ builddir = os.path.join(cros_build_lib.GetSysroot(board=board),
+ 'tmp', 'portage')
if not os.path.exists(builddir):
raise AssertionError(
"FATAL: %s missing.\n"