Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Pickup release archive verification tool changes from upstream. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | nextRelease |
Files: | files | file ages | folders |
SHA1: |
8692ce78495fa74741761cbfe78ce00a |
User & Date: | mistachkin 2015-03-03 02:54:21.775 |
Context
2015-03-03
| ||
03:15 | Update Eagle script library in externals to the latest trunk code. check-in: 12a71d6811 user: mistachkin tags: nextRelease | |
02:54 | Pickup release archive verification tool changes from upstream. check-in: 8692ce7849 user: mistachkin tags: nextRelease | |
00:09 | Cosmetic change to the previous check-in. check-in: 2eda4ee714 user: mistachkin tags: nextRelease | |
Changes
Changes to Setup/verify.eagle.
︙ | ︙ | |||
10 11 12 13 14 15 16 | package require Eagle proc usage { error } { if {[string length $error] > 0} then {puts stdout $error} puts stdout "usage:\ [file tail [info nameofexecutable]]\ | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | package require Eagle proc usage { error } { if {[string length $error] > 0} then {puts stdout $error} puts stdout "usage:\ [file tail [info nameofexecutable]]\ [file tail [info script]] <directory> <withHashes> \[failHashes\]" # # NOTE: Indicate to the caller, if any, that we have failed. # exit 1 } |
︙ | ︙ | |||
62 63 64 65 66 67 68 | } return "" } set argc [llength $argv] | | > > > > > > > > > > | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | } return "" } set argc [llength $argv] if {$argc >= 2 && $argc <= 3} then { set directory [lindex $argv 0] if {[string length $directory] == 0} then { usage "invalid directory specified" } if {![file isdirectory $directory]} then { usage [appendArgs \ "directory \"" $directory "\" does not exist"] } set withHashes [lindex $argv 1] if {[string length $withHashes] == 0} then { usage "invalid \"withHashes\" flag specified" } if {![string is boolean -strict $withHashes]} then { usage "bad \"withHashes\" flag, not a boolean" } set failHashes [expr {$argc >= 3 ? [lindex $argv 2] : true}] if {[string length $failHashes] == 0} then { usage "invalid \"failHashes\" flag specified" } if {![string is boolean -strict $failHashes]} then { usage "bad \"failHashes\" flag, not a boolean" } set exitCode 0 set script [info script] set path [file dirname $script] set rootName [file rootname [file tail $script]] |
︙ | ︙ | |||
157 158 159 160 161 162 163 164 165 166 167 168 169 170 | } if {[getSha1Hashes hashes] == 0} then { usage "no repository hashes are available" } } set archiveFileNames [list] foreach extension [list exe rar zip] { eval lappend archiveFileNames [findFilesRecursive \ [file join $directory [appendArgs *. $extension]]] } | > | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | } if {[getSha1Hashes hashes] == 0} then { usage "no repository hashes are available" } } set hashPrefix [expr {$failHashes ? "ERROR" : "WARNING"}] set archiveFileNames [list] foreach extension [list exe rar zip] { eval lappend archiveFileNames [findFilesRecursive \ [file join $directory [appendArgs *. $extension]]] } |
︙ | ︙ | |||
339 340 341 342 343 344 345 | eval [string map $extractCommandMap $extractCommand] } result] == 0} then { set hash [getSha1Sum $extractFileName] if {[string length $hash] > 0} then { if {$hash ne $hashes($manifestFileName)} then { puts stdout [appendArgs \ | | > | | > | > | | > | > | | > | > | > | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | eval [string map $extractCommandMap $extractCommand] } result] == 0} then { set hash [getSha1Sum $extractFileName] if {[string length $hash] > 0} then { if {$hash ne $hashes($manifestFileName)} then { puts stdout [appendArgs \ $hashPrefix ": Archive \"" $archiveFileName \ "\" file \"" $manifestFileName \ "\" repository hash mismatch, have \"" \ $hash "\", want \"" $hashes($manifestFileName) \ "\"."] if {$failHashes} then { set exitCode 1 } } } else { puts stdout [appendArgs \ $hashPrefix ": Archive \"" $archiveFileName \ "\" file \"" $manifestFileName \ "\" could not be hashed."] if {$failHashes} then { set exitCode 1 } } } else { puts stdout [appendArgs \ $hashPrefix ": Failed to extract file \"" \ $manifestFileName "\" from archive \"" \ $archiveFileName "\", error: " $result] if {$failHashes} then { set exitCode 1 } } } else { puts stdout [appendArgs \ $hashPrefix ": Archive \"" $archiveFileName \ "\" file \"" $manifestFileName \ "\" has no repository hash."] if {$failHashes} then { set exitCode 1 } } } finally { catch { file attributes $extractFileName -readonly false file delete $extractFileName } } |
︙ | ︙ |