[CVS AccessGrid] Toolkit.py:Added version command line option, exits after printer toolkit version.

Ivan R. Judson judson at mcs.anl.gov
Wed Mar 24 08:26:52 CST 2004


I've got a "VersionInformation" flag in the windows installer that's meant
for that meta data. It'd be nicer if it was down in the toolkit. It'd also
be nice if there were easy mechanisms to automatically verify the toolkit
version/version-info matched what the installers thought it was since it's
set in both places.

Ideas?

--Ivan
 

> -----Original Message-----
> From: Eric Olson [mailto:eolson at mcs.anl.gov] 
> Sent: Tuesday, March 23, 2004 5:06 PM
> To: Ivan R. Judson
> Cc: ag-dev at mcs.anl.gov
> Subject: Re: [CVS AccessGrid] Toolkit.py:Added version 
> command line option, exits after printer toolkit version.
> 
> We could use something in our versioning to indicate cvs or 
> development versions.
>   The Linux kernel uses even and odd numbers.  I've also seen 
> software where the version increments automatically each day in cvs.
> Any feelings on whether we need something or not?
> 
> Eric
> 
> On Tue, 23 Mar 2004, Ivan R. Judson wrote:
> 
> > Commit in AccessGrid/AccessGrid on MAIN
> > Toolkit.py+10-2 | 1.29 -> 1.30
> > 
> >  Added version command line option, exits after printer 
> toolkit version.
> > 
> > 
> ______________________________________________________________________
> > __________
> > AccessGrid/AccessGrid
> > Toolkit.py 1.29 -> 1.30
> > 
> >  diff -u -r1.29 -r1.30
> > --- Toolkit.py	22 Mar 2004 22:56:16 -0000	1.29
> > +++ Toolkit.py	23 Mar 2004 22:14:13 -0000	1.30
> > @@ -2,13 +2,13 @@
> > 
> >  # Name:        Toolkit.py
> >  # Purpose:     Toolkit-wide initialization and state management.
> >  # Created:     2003/05/06
> > 
> > -# RCS-ID:      $Id: Toolkit.py,v 1.29 2004/03/22 22:56:16 
> olson Exp $
> > 
> > +# RCS-ID:      $Id: Toolkit.py,v 1.30 2004/03/23 22:14:13 
> judson Exp $
> > 
> >  # Copyright:   (c) 2002
> >  # Licence:     See COPYING.TXT
> >  
> > 
> #---------------------------------------------------------------------
> > --------
> >  """
> >  """
> > 
> > -__revision__ = "$Id: Toolkit.py,v 1.29 2004/03/22 22:56:16 
> olson Exp $"
> > 
> > +__revision__ = "$Id: Toolkit.py,v 1.30 2004/03/23 22:14:13 
> judson Exp $"
> > 
> >  
> >  # Standard imports
> >  import os
> > 
> > @@ -24,6 +24,7 @@
> > 
> >  from AccessGrid.Platform.Config import AGTkConfig, 
> GlobusConfig  from 
> > AccessGrid.Platform.Config import SystemConfig, UserConfig  from 
> > AccessGrid.ServiceProfile import ServiceProfile
> > 
> > +from AccessGrid.Version import GetVersion
> > 
> >  
> >  class AppBase:
> >      """
> > 
> > @@ -56,6 +57,9 @@
> > 
> >         self.parser.add_option("-c", "--configfile", 
> dest="configfilename",
> >                                metavar="CONFIGFILE", default=None,
> >                           help="Specify a configuration 
> file for the 
> > program.")
> > 
> > +       self.parser.add_option("--version", 
> action="store_true", dest="version",
> > +                              default=0,
> > +                         help="Print out what version of 
> the toolkit 
> > + this is.")
> > 
> >         
> >         self.certMgrUI = None
> >         self.userConfig = None
> > 
> > @@ -143,6 +147,10 @@
> > 
> >         
> >         (self.options, args) = self.parser.parse_args()
> >  
> > 
> > +       if self.options.version:
> > +           print "Access Grid Toolkit Version: ", GetVersion()
> > +           sys.exit(0)
> > +           
> > 
> >         if self.options.debug:
> >             levelHandler = Log.HandleLoggers(self.defLogHandler,
> >                                             Log.GetDefaultLoggers())
> >                                  CVSspam 0.2.8
> > 
> > 
> 
> 




More information about the ag-dev mailing list