[petsc-dev] downloadname usage inconsistency in config.package.Package?
Barry Smith
bsmith at mcs.anl.gov
Mon Oct 18 20:26:11 CDT 2010
On Oct 18, 2010, at 7:46 PM, Dmitry Karpeev wrote:
> 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?
I think it just means the help message would be wrong if downloadname was not package.
The problem I think is that downloadname might not be defined at the time of setupHelp() so cannot be used in printing the help message.
> Also, why ".tolower()" all over the place?
So that you only need to type smalls in your -download-xxxx
>
> Dmitry.
More information about the petsc-dev
mailing list