Overview
Comment: | Robustify the handling of malformed responses from the package repository server. Add comments. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2ea4b56805c97ea947f83a83d7a46db9 |
User & Date: | mistachkin on 2016-08-15 05:06:50 |
Other Links: | manifest | tags |
Context
2016-08-15
| ||
18:30 | Add support for hooking the 'package unknown' handler in both Tcl and Eagle. check-in: 3bc512e10f user: mistachkin tags: trunk | |
05:06 | Robustify the handling of malformed responses from the package repository server. Add comments. check-in: 2ea4b56805 user: mistachkin tags: trunk | |
03:18 | Evaluate the package 'ifneeded' script in the global call frame, in both Tcl and Eagle. check-in: 933b5b078c user: mistachkin tags: trunk | |
Changes
Modified client/pkgr.eagle from [8888379407] to [ddaa5b7b84].
︙ | ︙ | |||
433 434 435 436 437 438 439 440 441 442 443 444 | [namespace current] :: tclMustBeReady]]] return [eagle $script(outer)] } } proc main { package version } { set data [getLookupData [getLookupApiKey] $package $version] set code [getLookupCodeFromData $data] set result [getLookupResultFromData $data] if {![isLookupCodeOk $code]} then { | > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | | > > > > > > > > > > | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | [namespace current] :: tclMustBeReady]]] return [eagle $script(outer)] } } proc main { package version } { # # NOTE: Issue the lookup request to the remote package repository. # set data [getLookupData [getLookupApiKey] $package $version] # # NOTE: Attempt to grab the lookup code from the response data. # set code [getLookupCodeFromData $data] # # NOTE: Attempt to grab the lookup data from the response data. # Upon failure, this should contain the error message. # set result [getLookupResultFromData $data] # # NOTE: Did the lookup operation fail? # if {![isLookupCodeOk $code]} then { # # NOTE: Is there an error message? # if {[string length $result] > 0} then { # # NOTE: Yes. Use the returned error message verbatim. # error $result } else { # # NOTE: No. Use the whole response data string as the error # message. # error $data } } # # NOTE: Process the lookup data into the pieces of metadata that we # need to load the requested package. # extractAndVerifyLookupMetadata $result metadata # # NOTE: Attempt to load the requested package using the metadata # extracted in the previous step. # processLookupMetadata metadata } if {![isEagle]} then { ########################################################################### ############################# BEGIN Tcl ONLY ############################## ########################################################################### |
︙ | ︙ |
Modified client/pkgr.eagle.harpy from [2af0459545] to [eb19421d6f].
︙ | ︙ | |||
17 18 19 20 21 22 23 | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> | | | | | | | | | | | | | | | | | | | | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> <Id>9f926fa1-99a4-41ab-bb33-50e8576a6d21</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-15T05:05:47.5290547Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x2c322765603b5278</Key> <Signature> EQJrODV4AbXpPIBdhsRfDnbJuZQjwzXpfYL0UZu0NrVaXxyotFhF9dcEg9WagSn80zW4Cy0gFBJf n8O0f8VDO8JJTsw0RLUvSspi16fPc1KLJXRccdwpNgVM0qQLRcLQIfFrD1oqbOjesyO6GQNIKkAg muF/SF/ZtRyfbpPcjF9Ilttjch6iZGI8J+s5KgfvplPeHkFgM0L6pdjNgT5HTHj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