Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 2 # | |
|
sosa
2011/02/02 01:16:19
same
diandersAtChromium
2011/02/02 01:49:10
Done.
| |
| 3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 """Implementation of the various portage wrapper commands.""" | |
| 8 | |
| 9 | |
| 10 from chromite.shell import subcmd | |
| 11 | |
| 12 | |
| 13 class EbuildCmd(subcmd.WrappedChrootCmd): | |
| 14 """Run ebuild.""" | |
| 15 | |
| 16 def __init__(self): | |
| 17 """EbuildCmd constructor.""" | |
| 18 # Just call the WrappedChrootCmd superclass, which does most of the work. | |
| 19 super(EbuildCmd, self).__init__( | |
| 20 ['ebuild-%s'], ['ebuild'], | |
| 21 need_args=True | |
| 22 ) | |
| 23 | |
| 24 | |
| 25 class EmergeCmd(subcmd.WrappedChrootCmd): | |
| 26 """Run emerge.""" | |
| 27 | |
| 28 def __init__(self): | |
| 29 """EmergeCmd constructor.""" | |
| 30 # Just call the WrappedChrootCmd superclass, which does most of the work. | |
| 31 super(EmergeCmd, self).__init__( | |
| 32 ['emerge-%s'], ['sudo', 'emerge'], | |
| 33 need_args=True | |
| 34 ) | |
| 35 | |
| 36 | |
| 37 class EqueryCmd(subcmd.WrappedChrootCmd): | |
| 38 """Run equery.""" | |
| 39 | |
| 40 def __init__(self): | |
| 41 """EqueryCmd constructor.""" | |
| 42 # Just call the WrappedChrootCmd superclass, which does most of the work. | |
| 43 super(EqueryCmd, self).__init__( | |
| 44 ['equery-%s'], ['equery'], | |
| 45 need_args=True | |
| 46 ) | |
| 47 | |
| 48 | |
| 49 class PortageqCmd(subcmd.WrappedChrootCmd): | |
| 50 """Run portageq.""" | |
| 51 | |
| 52 def __init__(self): | |
| 53 """PortageqCmd constructor.""" | |
| 54 # Just call the WrappedChrootCmd superclass, which does most of the work. | |
| 55 super(PortageqCmd, self).__init__( | |
| 56 ['portageq-%s'], ['portageq'], | |
| 57 need_args=True | |
| 58 ) | |
| OLD | NEW |