Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: shell/subcmds/portage_cmds.py

Issue 6250058: Split out the big chromite shell 'main.py' into lots of subfiles. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromite.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: shell/subcmds/portage_cmds.py
diff --git a/shell/subcmds/portage_cmds.py b/shell/subcmds/portage_cmds.py
new file mode 100644
index 0000000000000000000000000000000000000000..1389af5abd8f1a3c389a7d83e2a37c405c481e3c
--- /dev/null
+++ b/shell/subcmds/portage_cmds.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+#
sosa 2011/02/02 01:16:19 same
diandersAtChromium 2011/02/02 01:49:10 Done.
+# Copyright (c) 2011 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.
+
+"""Implementation of the various portage wrapper commands."""
+
+
+from chromite.shell import subcmd
+
+
+class EbuildCmd(subcmd.WrappedChrootCmd):
+ """Run ebuild."""
+
+ def __init__(self):
+ """EbuildCmd constructor."""
+ # Just call the WrappedChrootCmd superclass, which does most of the work.
+ super(EbuildCmd, self).__init__(
+ ['ebuild-%s'], ['ebuild'],
+ need_args=True
+ )
+
+
+class EmergeCmd(subcmd.WrappedChrootCmd):
+ """Run emerge."""
+
+ def __init__(self):
+ """EmergeCmd constructor."""
+ # Just call the WrappedChrootCmd superclass, which does most of the work.
+ super(EmergeCmd, self).__init__(
+ ['emerge-%s'], ['sudo', 'emerge'],
+ need_args=True
+ )
+
+
+class EqueryCmd(subcmd.WrappedChrootCmd):
+ """Run equery."""
+
+ def __init__(self):
+ """EqueryCmd constructor."""
+ # Just call the WrappedChrootCmd superclass, which does most of the work.
+ super(EqueryCmd, self).__init__(
+ ['equery-%s'], ['equery'],
+ need_args=True
+ )
+
+
+class PortageqCmd(subcmd.WrappedChrootCmd):
+ """Run portageq."""
+
+ def __init__(self):
+ """PortageqCmd constructor."""
+ # Just call the WrappedChrootCmd superclass, which does most of the work.
+ super(PortageqCmd, self).__init__(
+ ['portageq-%s'], ['portageq'],
+ need_args=True
+ )

Powered by Google App Engine
This is Rietveld 408576698