Add strip_package script
Just calls into the devserver code. Used by cbuildbot to strip the
Chrome package.
BUG=chromium-os:31611
TEST=Ran through remote trybot
Change-Id: I4905eed47f8c7d7c95a0d824c860707cabd4da97
Reviewed-on: https://gerrit.chromium.org/gerrit/25592
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
diff --git a/strip_package.py b/strip_package.py
new file mode 100755
index 0000000..3d500e1
--- /dev/null
+++ b/strip_package.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+
+# Copyright (c) 2009-2012 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Script that strips a given package and places the stripped version in
+ /build/<board>/stripped-packages."""
+
+import builder
+import optparse
+
+
+def main():
+ parser = optparse.OptionParser(usage='usage: %prog [options] package')
+ parser.add_option('--board', type='string', action='store',
+ help=('The board that the package being processed belongs '
+ 'to.'))
+ parser.add_option('--deep', action='store_true', default=False,
+ help=('Also strip dependencies of package.'))
+
+ (options, args) = parser.parse_args()
+ if len(args) != 1:
+ parser.print_help()
+ parser.error('Need exactly one package name')
+
+ if not options.board:
+ parser.error('Need to specify --board')
+
+ builder.UpdateGmergeBinhost(options.board, args[0], options.deep)
+
+
+if __name__ == '__main__':
+ main()