blob: 1ca70d4662b0cabc9809a6785983751c4b7e73be [file] [log] [blame]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2015 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.
"""Strip packages and place them in <sysroot>/stripped-packages."""
from __future__ import print_function
import argparse
import sys
import builder
def main():
parser = argparse.ArgumentParser()
target = parser.add_mutually_exclusive_group(required=True)
help='The board that processed packages belong to.')
help=('Sysroot that processed packages belong to. '
'This is incompatible with --board.'))
parser.add_argument('--deep', action='store_true',
help='Also strip dependencies of packages.')
parser.add_argument('packages', nargs='+', metavar='package',
help='Package to strip.')
options = parser.parse_args()
sysroot = options.sysroot or '/build/%s' % options.board
# Check if packages were installed.
if not builder.UpdateGmergeBinhost(sysroot, options.packages, options.deep):
if __name__ == '__main__':