On Sat, Jul 23, 2011 at 3:03 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
   Matt,<br>
<br>
   When a user provides --download-packagename for any package that does not support --download-   configure silently ignores their request leading the user to think that it actually did download the package.<br>
<br>
   This is because in package.py there is the code<br>
<br>
  def checkDownload(self, requireDownload = 1):<br>
    '''Check if we should download the package, returning the install directory or the empty string indicating installation'''<br>
    if not self.download:<br>
      return ''<br>
<br>
   I naively thought I could simple add a check if the user provided --download-package but self.download was not supported it would error out with a useful error message. That proved impossible.<br></blockquote><div><br>
</div><div>Impossible!!! This is ridiculous. Either I have no idea what you want, or this is a serious case of Not Invented Here syndrome (also I did not even write these lines of code).</div><div><br></div><div><div>@@ -480,6 +480,8 @@</div>
<div>         raise RuntimeError('External package '+<a href="http://self.name">self.name</a>+' does not work on Microsoft Windows')</div><div>       if self.download and self.framework.argDB.has_key('download-'+self.downloadname.lower()) and self.framework.argDB['download-'+self.downloadname.lower()] and not self.downloadonWindows and self.setCompilers.isCygwin():</div>
<div>         raise RuntimeError('External package '+<a href="http://self.name">self.name</a>+' does not support --download-'+self.downloadname.lower()+' on Microsoft Windows')</div><div>+    if not self.download and self.framework.argDB.has_key('download-'+self.downloadname.lower()) and self.framework.argDB['download-'+self.downloadname.lower()]:</div>
<div>+      raise RuntimeError('External package '+<a href="http://self.name">self.name</a>+' does not support --download-'+self.downloadname.lower())</div><div>     return</div></div><div><br></div><div><br>
</div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
   Could you please add something to BuildSystem so that if a user requests --download-packagename but that functionality is not supported it generates a nice error message, in particular this needs to work for --download-thrust --download-cusp and --download-cuda but there are many others as well.<br>

<br>
    Thanks<br>
<font color="#888888"><br>
    Barry<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>