[yum-cvs] yum cli.py,1.207,1.208 shell.py,1.26,1.27

Seth Vidal skvidal at linux.duke.edu
Wed Feb 22 21:25:25 UTC 2006


Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv5411

Modified Files:
	cli.py shell.py 
Log Message:

a few more last minute changes to the shell and cli way of figuring out if a
command is valid


Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -r1.207 -r1.208
--- cli.py	22 Feb 2006 06:37:20 -0000	1.207
+++ cli.py	22 Feb 2006 21:25:23 -0000	1.208
@@ -54,6 +54,14 @@
     def __init__(self):
         yum.YumBase.__init__(self)
         self.in_shell = False
+        self.yum_cli_commands = ['update', 'install','info', 'list', 'erase',
+                                'grouplist', 'groupupdate', 'groupinstall',
+                                'groupremove', 'groupinfo', 'makecache',
+                                'clean', 'remove', 'provides', 'check-update',
+                                'search', 'upgrade', 'whatprovides',
+                                'localinstall', 'localupdate',
+                                'resolvedep', 'shell', 'deplist']
+        
         
     def doRepoSetup(self, thisrepo=None, dosack=1):
         """grabs the repomd.xml for each enabled repository 
@@ -339,13 +347,7 @@
             for arg in self.extcmds:
                 self.log(3, '   %s' % arg)
         
-        if self.basecmd not in ['update', 'install','info', 'list', 'erase',
-                                'grouplist', 'groupupdate', 'groupinstall',
-                                'groupremove', 'groupinfo', 'makecache',
-                                'clean', 'remove', 'provides', 'check-update',
-                                'search', 'upgrade', 'whatprovides',
-                                'localinstall', 'localupdate',
-                                'resolvedep', 'shell', 'deplist']:
+        if self.basecmd not in self.yum_cli_commands:
             self.usage()
             raise CliError
     

Index: shell.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/shell.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- shell.py	22 Feb 2006 20:52:49 -0000	1.26
+++ shell.py	22 Feb 2006 21:25:23 -0000	1.27
@@ -33,11 +33,10 @@
         self.resultmsgs = ['Leaving Shell']
         if (len(base.extcmds)) > 0:
             self.file = base.extcmds[0]
-        self.commandlist = ['clean', 'repo', 'exit', 'groupinfo',
-            'groupinstall', 'grouplist', 'groupremove', 'groupupdate',
-            'info', 'install', 'list', 'localinstall', 'repository',
-            'makecache', 'provides', 'quit', 'remove', 'run', 'search',
-            'transaction', 'ts', 'update', 'config', 'deplist']
+        self.shell_specific_commands = ['repo', 'repository', 'exit', 'quit',
+                'run', 'ts', 'transaction', 'config']
+                
+        self.commandlist = self.shell_specific_commands + self.base.yum_cli_commands
 
 
     def _shlex_split(self, input_string):
@@ -89,7 +88,14 @@
         pass
     
     def do_help(self, arg):
-        msg = ''
+        msg = """
+    Shell specific arguments:
+      config - set config options
+      repository (or repo) - enable/disable repositories
+      transaction (or ts) - list, reset or run the transaction set
+      run - run the transaction set
+      exit or quit - exit the shell
+    """
             
         if arg in ['transaction', 'ts']:
             msg = """




More information about the Yum-cvs-commits mailing list