revisor/modmock/Makefile.am |    8 +++++
 revisor/modmock/__init__.py |   63 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)

New commits:
commit 5f656e72159da06b3e3253e215f622bce0a86946
Author: Jeroen van Meeuwen (Fedora Unity) <kana...@fedoraunity.org>
Date:   Sun Feb 1 20:36:32 2009 +0100

    Add modmock

diff --git a/revisor/modmock/Makefile.am b/revisor/modmock/Makefile.am
new file mode 100644
index 0000000..394e1ac
--- /dev/null
+++ b/revisor/modmock/Makefile.am
@@ -0,0 +1,8 @@
+PYTHON_FILES = \
+    __init__.py
+
+EXTRA_DIST = \
+    $(PYTHON_FILES)
+
+pydir = $(pythondir)/revisor/modmock
+py_PYTHON = $(PYTHON_FILES)
diff --git a/revisor/modmock/__init__.py b/revisor/modmock/__init__.py
new file mode 100644
index 0000000..60ca15f
--- /dev/null
+++ b/revisor/modmock/__init__.py
@@ -0,0 +1,63 @@
+#
+# Copyright 2007 Fedora Unity
+#
+# Jonathan Steffan <jon a fedoraunity.org>
+# Jeroen van Meeuwen <kanarip a fedoraunity.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 only
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import os
+import fnmatch
+import re
+import revisor.misc
+import shutil
+import sys
+import subprocess
+import yum.Errors
+
+# Translation
+from rhpl.translate import _
+
+class RevisorMock:
+    def __init__(self):
+        """Let's you supply a custom isolinux.cfg"""
+        pass
+
+    def set_defaults(self, defaults):
+        pass
+
+    def add_options(self, parser):
+        """Adds Mock Options group to the OptionParser instance you give it 
(parser),
+        and adds the options for this module to that group"""
+        mock_options = parser.add_option_group(_("Mock Options"))
+
+        mock_options.add_option("--mock-cfg",
+                                dest    = "mock_cfg",
+                                action  = "store",
+                                default = "",
+                                help    = _("Mock configuration name to use."),
+                                metavar = "[mock-config]")
+
+    def check_options(self, cfg, cli_options):
+        """This function checks the option rebrand"""
+        self.cfg = cfg
+        self.log = cfg.log
+
+    def pre_exec_buildinstall(self):
+        from mock.backend import Root
+
+        # mock -v -r fedora-10-i386 clean
+        # mock -v -r fedora-10-i386 init
+        # mock -v -r fedora-10-i386 install
+        pass


_______________________________________________
revisor-devel mailing list
revisor-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/revisor-devel

Reply via email to