[yum-cvs] yum cli.py,1.241.2.1,1.241.2.2

Jeremy Katz katzj at linux.duke.edu
Fri Nov 3 18:11:45 UTC 2006


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

Modified Files:
      Tag: yum-3_0_X
	cli.py 
Log Message:
print out version before plugins are loaded (rh#212292)


Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.241.2.1
retrieving revision 1.241.2.2
diff -u -r1.241.2.1 -r1.241.2.2
--- cli.py	13 Oct 2006 01:25:02 -0000	1.241.2.1
+++ cli.py	3 Nov 2006 18:11:43 -0000	1.241.2.2
@@ -171,7 +171,7 @@
         # Parse only command line options that affect basic yum setup
         try:
             args = _filtercmdline(
-                        ('--noplugins',), 
+                        ('--noplugins','--version'), 
                         ('-c', '-d', '-e', '--installroot'), 
                         args,
                     )
@@ -180,6 +180,11 @@
             sys.exit(1)
         opts = self.optparser.parse_args(args=args)[0]
 
+        # Just print out the version if that's what the user wanted
+        if opts.version:
+            print yum.__version__
+            sys.exit(0)
+
         # If the conf file is inside the  installroot - use that.
         # otherwise look for it in the normal root
         if opts.installroot:
@@ -211,11 +216,6 @@
         # Now parse the command line for real
         (opts, self.cmds) = self.optparser.parse_args()
 
-        # Just print out the version if that's what the user wanted
-        if opts.version:
-            print yum.__version__
-            sys.exit(0)
-
         # Let the plugins know what happened on the command line
         self.plugins.setCmdLine(opts, self.cmds)
 




More information about the Yum-cvs-commits mailing list