[petsc-dev] downloadname usage inconsistency in config.package.Package?

Dmitry Karpeev karpeev at mcs.anl.gov
Mon Oct 18 19:46:50 CDT 2010


In config/BuildSystem/config/package.py we have this:

class Package:
  <snip>
 def setupHelp(self,help):
    '''Prints help messages for the package'''
    <snip>
    if self.download and not self.download[0] == 'redefine':
      help.addArgument(self.PACKAGE,
'-download-'+self.package+'=<no,yes,filename>',
nargs.ArgDownload(None, 0, 'Download and install '+self.name))
    return

Then:

  def checkDownload(self, requireDownload = 1):
    '''Check if we should download the package, returning the install
directory or the empty string indicating installation'''
    if not self.download:
      return ''
    downloadPackage = 0
    downloadPackageVal =
self.framework.argDB['download-'+self.downloadname.lower()]
    <snip>

An apparent inconsistency if not self.downloadname.tolower() == self.package.
Is this a bug?
Also, why ".tolower()" all over the place?

Dmitry.



More information about the petsc-dev mailing list