OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2011 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. |
| 4 |
| 5 """Implementation of the various portage wrapper commands.""" |
| 6 |
| 7 |
| 8 from chromite.shell import subcmd |
| 9 |
| 10 |
| 11 class EbuildCmd(subcmd.WrappedChrootCmd): |
| 12 """Run ebuild.""" |
| 13 |
| 14 def __init__(self): |
| 15 """EbuildCmd constructor.""" |
| 16 # Just call the WrappedChrootCmd superclass, which does most of the work. |
| 17 super(EbuildCmd, self).__init__( |
| 18 ['ebuild-%s'], ['ebuild'], |
| 19 need_args=True |
| 20 ) |
| 21 |
| 22 |
| 23 class EmergeCmd(subcmd.WrappedChrootCmd): |
| 24 """Run emerge.""" |
| 25 |
| 26 def __init__(self): |
| 27 """EmergeCmd constructor.""" |
| 28 # Just call the WrappedChrootCmd superclass, which does most of the work. |
| 29 super(EmergeCmd, self).__init__( |
| 30 ['emerge-%s'], ['sudo', 'emerge'], |
| 31 need_args=True |
| 32 ) |
| 33 |
| 34 |
| 35 class EqueryCmd(subcmd.WrappedChrootCmd): |
| 36 """Run equery.""" |
| 37 |
| 38 def __init__(self): |
| 39 """EqueryCmd constructor.""" |
| 40 # Just call the WrappedChrootCmd superclass, which does most of the work. |
| 41 super(EqueryCmd, self).__init__( |
| 42 ['equery-%s'], ['equery'], |
| 43 need_args=True |
| 44 ) |
| 45 |
| 46 |
| 47 class PortageqCmd(subcmd.WrappedChrootCmd): |
| 48 """Run portageq.""" |
| 49 |
| 50 def __init__(self): |
| 51 """PortageqCmd constructor.""" |
| 52 # Just call the WrappedChrootCmd superclass, which does most of the work. |
| 53 super(PortageqCmd, self).__init__( |
| 54 ['portageq-%s'], ['portageq'], |
| 55 need_args=True |
| 56 ) |
OLD | NEW |