Diff
Not logged in

Differences From Artifact [8888379407]:

To Artifact [ddaa5b7b84]:


433
434
435
436
437
438
439



440




441





442
443



444







445






446
447





448





449
450
451
452
453
454
455
          [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 {







      error $result






    }






    extractAndVerifyLookupMetadata $result metadata





    processLookupMetadata metadata
  }

  if {![isEagle]} then {
    ###########################################################################
    ############################# BEGIN Tcl ONLY ##############################
    ###########################################################################







>
>
>

>
>
>
>

>
>
>
>
>


>
>
>

>
>
>
>
>
>
>
|
>
>
>
>
>
>
|
|
>
>
>
>
>

>
>
>
>
>







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 ##############################
    ###########################################################################