1 # Copyright 2014 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 """Emerge hook to pre-parse and verify license information.
7 Called from src/scripts/hooks/install/gen-package-licenses.sh as part of a
11 from __future__ import print_function
13 from chromite.lib import commandline
15 from chromite.licensing import licenses_lib
19 parser = commandline.ArgumentParser(usage=__doc__)
20 parser.add_argument('--builddir', type='path', dest='builddir',
21 help='Take $PORTAGE_BUILDDIR as argument.')
23 opts = parser.parse_args(args)
26 licenses_lib.HookPackageProcess(opts.builddir)