System.Data.SQLite
Check-in [a2473ecc36]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improve robustness of the download page update script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a2473ecc36ef54bb375157ddeb38ee8d895b1124
User & Date: mistachkin 2015-07-30 17:59:34
Context
2015-07-30
18:13
Further improvements to the download page update script. check-in: 872bd8c9ee user: mistachkin tags: trunk
18:00
Merge updates from trunk. check-in: 5c62d58e23 user: mistachkin tags: preRelease
17:59
Improve robustness of the download page update script. check-in: a2473ecc36 user: mistachkin tags: trunk
16:27
Update some incorect SHA1 hashes on the download page. check-in: 36e46ec005 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/updateFileInfo.tcl.

    79     79   
    80     80   if {![info exists outputDirectory] || \
    81     81       [string length $outputDirectory] == 0} then {
    82     82     set outputDirectory [file join $path Output]
    83     83   }
    84     84   
    85     85   #
    86         -# NOTE: Setup the regular expression pattern with the necessary captures.  This
    87         -#       pattern is mostly non-greedy; however, at the end we need to match
    88         -#       exactly 40 hexadecimal characters.  In theory, in Tcl, this could have
    89         -#       an undefined result due to the mixing of greedy and non-greedy
           86  +# NOTE: Setup the regular expression patterns with the necessary captures.
           87  +#       These patterns are mostly non-greedy; however, at the end we need to
           88  +#       match exactly 40 hexadecimal characters.  In theory, in Tcl, this could
           89  +#       have an undefined result due to the mixing of greedy and non-greedy
    90     90   #       quantifiers; however, in practice, this seems to work properly.  Also,
    91     91   #       this pattern assumes a particular structure for the [HTML] file to be
    92     92   #       updated.
    93     93   #
    94     94   set pattern1 {<a\
    95     95       href=".*?/(.*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
    96     96       ([0-9A-F]{40})}
    97     97   
    98     98   set pattern2 {<a\
    99     99       href=".*?/package/.*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
   100    100       MiB\).*?sha1: ([0-9A-F]{40})}
   101    101   
          102  +set pattern3 {href="/downloads/(.*?)"}
          103  +set pattern4 {\(sha1: ([0-9A-F]{40})\)}
          104  +
   102    105   #
   103    106   # NOTE: Grab all the data from the file to be updated.
   104    107   #
   105    108   set data [readFile $updateFileName]
   106    109   
   107    110   #
   108    111   # NOTE: Initialize the total number of changes made to zero.
................................................................................
   175    178         incr count [regsub -nocase -start $start -- "***=$fileHash" $data \
   176    179             $newFileHash data]
   177    180   
   178    181         incr start [string length $fileHash]
   179    182       }
   180    183     }
   181    184   }
          185  +
          186  +#
          187  +# NOTE: Attempt to verify that each file name now has the correct SHA1 hash
          188  +#       associated with it on the page.
          189  +#
          190  +foreach {dummy3 fileName} [regexp -all -inline -nocase -- $pattern3 $data] \
          191  +        {dummy4 fileHash} [regexp -all -inline -nocase -- $pattern4 $data] {
          192  +  #
          193  +  # NOTE: Get the fully qualified file name based on the configured
          194  +  #       directory.
          195  +  #
          196  +  set fullFileName [file join $outputDirectory [file tail $fileName]]
          197  +
          198  +  #
          199  +  # NOTE: Make sure the file hash from the [modified] data matches the
          200  +  #       calculated hash for the file.  If not, fail.
          201  +  #
          202  +  set fullFileHash [getFileHash $fullFileName]
          203  +
          204  +  if {$fileHash ne $fullFileHash} then {
          205  +    puts stdout "ERROR: SHA1 hash mismatch for\
          206  +        file \"$fullFileName\", have \"$fileHash\" (from data),\
          207  +        need \"$fullFileHash\" (calculated)."
          208  +  }
          209  +}
   182    210   
   183    211   #
   184    212   # NOTE: Write the [modified] data to the file to be updated.
   185    213   #
   186    214   if {$count > 0} then {
   187    215     writeFile $updateFileName $data
   188    216   } else {
   189    217     puts stdout "WARNING: No changes, update of \"$updateFileName\" skipped."
   190    218   }

Changes to www/downloads.wiki.

   479    479           required.
   480    480           <br />
   481    481           <big><b>This is the only setup package that is capable of installing the
   482    482           design-time components for Visual Studio 2005.
   483    483           <br />
   484    484           <br />
   485    485           However, if you do not require the design-time components, please
   486         -        consider downloading the associated
   487         -        <a href="/downloads/1.0.97.0/sqlite-netFx20-binary-bundle-Win32-2005-1.0.97.0.zip">Precompiled Binaries</a>
          486  +        consider downloading the associated &quot;Precompiled Binaries&quot;
   488    487           instead.</b></big>
   489    488           <br />
   490    489           <br />
   491    490           (sha1: daa0f42621b93769755fb7a6546eddd3d56b8e72)
   492    491         </td>
   493    492       </tr>
   494    493   
................................................................................
   579    578           required.
   580    579           <br />
   581    580           <big><b>This is the only setup package that is capable of installing the
   582    581           design-time components for Visual Studio 2008.
   583    582           <br />
   584    583           <br />
   585    584           However, if you do not require the design-time components, please
   586         -        consider downloading the associated
   587         -        <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-bundle-Win32-2008-1.0.97.0.zip">Precompiled Binaries</a>
          585  +        consider downloading the associated &quot;Precompiled Binaries&quot;
   588    586           instead.</b></big>
   589    587           <br />
   590    588           <br />
   591    589           (sha1: 03d86dba982e89dadfd19fc9bce775dcab040632)
   592    590         </td>
   593    591       </tr>
   594    592   
................................................................................
   678    676           SP1 runtime for x86 is included.  The .NET Framework 4.0 is required.
   679    677           <br />
   680    678           <big><b>This is the only setup package that is capable of installing the
   681    679           design-time components for Visual Studio 2010.
   682    680           <br />
   683    681           <br />
   684    682           However, if you do not require the design-time components, please
   685         -        consider downloading the associated
   686         -        <a href="/downloads/1.0.97.0/sqlite-netFx40-binary-bundle-Win32-2010-1.0.97.0.zip">Precompiled Binaries</a>
   687         -        instead.</b></big></b></big>
          683  +        consider downloading the associated &quot;Precompiled Binaries&quot;
          684  +        instead.</b></big>
   688    685           <br />
   689    686           <br />
   690    687           (sha1: 182ae1db5c4747a4d24a8498a0c8ab14dfea3a55)
   691    688         </td>
   692    689       </tr>
   693    690   
   694    691       <tr>
................................................................................
   777    774           required.
   778    775           <br />
   779    776           <big><b>This is the only setup package that is capable of installing the
   780    777           design-time components for Visual Studio 2012.
   781    778           <br />
   782    779           <br />
   783    780           However, if you do not require the design-time components, please
   784         -        consider downloading the associated
   785         -        <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip">Precompiled Binaries</a>
   786         -        instead.
          781  +        consider downloading the associated &quot;Precompiled Binaries&quot;
          782  +        instead.</b></big>
   787    783           <br />
   788    784           <br />
   789         -        Using Entity Framework 6 design-time support may require installing the
   790         -        Visual Studio 2012 &quot;flavor&quot; of the
          785  +        <big><b>Using Entity Framework 6 design-time support may require
          786  +        installing the Visual Studio 2012 &quot;flavor&quot; of the
   791    787           <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762">
   792    788           Entity Framework 6 Tools for Visual Studio 2012 &amp; 2013</a>.</b></big>
   793    789           <br />
   794    790           <br />
   795    791           (sha1: ff9df099dce5e3f0d478e33f587a2866cae9c8ab)
   796    792         </td>
   797    793       </tr>
................................................................................
   883    879           required.
   884    880           <br />
   885    881           <big><b>This is the only setup package that is capable of installing the
   886    882           design-time components for Visual Studio 2013.
   887    883           <br />
   888    884           <br />
   889    885           However, if you do not require the design-time components, please
   890         -        consider downloading the associated
   891         -        <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip">Precompiled Binaries</a>
   892         -        instead.
          886  +        consider downloading the associated &quot;Precompiled Binaries&quot;
          887  +        instead.</b></big>
   893    888           <br />
   894    889           <br />
   895         -        Using Entity Framework 6 design-time support may require installing the
   896         -        Visual Studio 2013 &quot;flavor&quot; of the
          890  +        <big><b>Using Entity Framework 6 design-time support may require
          891  +        installing the Visual Studio 2013 &quot;flavor&quot; of the
   897    892           <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762">
   898    893           Entity Framework 6 Tools for Visual Studio 2012 &amp; 2013</a>.</b></big>
   899    894           <br />
   900    895           <br />
   901    896           (sha1: 15e31d48589c72d17e2269f72110c7e7a32cb6e3)
   902    897         </td>
   903    898       </tr>
................................................................................
  1232   1227   
  1233   1228       <tr>
  1234   1229         <td width="10">&nbsp;</td>
  1235   1230         <td width="30%" valign="top" align="right">
  1236   1231           <a name="sqlite-netFx45-binary-bundle-Win32-2012"></a>
  1237   1232           <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip">sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip</a>
  1238   1233           <br />
  1239         -        (2.09 MiB)
         1234  +        (2.08 MiB)
  1240   1235         </td>
  1241   1236         <td width="5"></td>
  1242   1237         <td valign="top">
  1243   1238           This binary package features the mixed-mode assembly and contains all
  1244   1239           the binaries for the x86 version of the System.Data.SQLite 1.0.97.0
  1245   1240           (3.8.10.2) package.  The Visual C++ 2012 Update 4 runtime for x86 and
  1246   1241           the .NET Framework 4.5 are required.
................................................................................
  1318   1313   
  1319   1314       <tr>
  1320   1315         <td width="10">&nbsp;</td>
  1321   1316         <td width="30%" valign="top" align="right">
  1322   1317           <a name="sqlite-netFx451-binary-bundle-Win32-2013"></a>
  1323   1318           <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip">sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip</a>
  1324   1319           <br />
  1325         -        (2.08 MiB)
         1320  +        (2.09 MiB)
  1326   1321         </td>
  1327   1322         <td width="5"></td>
  1328   1323         <td valign="top">
  1329   1324           This binary package features the mixed-mode assembly and contains all
  1330   1325           the binaries for the x86 version of the System.Data.SQLite 1.0.97.0
  1331   1326           (3.8.10.2) package.  The Visual C++ 2013 Update 2 runtime for x86 and the
  1332   1327           .NET Framework 4.5.1 are required.