Diff
Not logged in

Differences From Artifact [2dc38da858]:

To Artifact [6e19099e1a]:


237
238
239
240
241
242
243
244
245
246
247
248
249






















250
251
252
253



254
255
256

257
258
259



260
261
262
263
264
265
266
237
238
239
240
241
242
243






244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266



267
268
269
270


271
272


273
274
275
276
277
278
279
280
281
282







-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

-
-
-
+
+
+

-
-
+

-
-
+
+
+








    return $result
  }

  #
  # NOTE: This procedure returns the list of API keys to use when looking
  #       up packages via the package repository server.  An empty list
  #       is returned if no API keys are currently configured.  There are
  #       no arguments.
  #
  # <public>
  proc getLookupApiKeys {} {
    set varName [appendArgs [getLookupVarNamePrefix] api_keys]
  #       is returned if no API keys are currently configured.  The prefix
  #       argument is an extra variable name prefix to check prior to any
  #       that are already configured.
  #
  # <internal>
  proc getApiKeys { {prefix ""} } {
    global env

    set prefixes [list]

    if {[string length $prefix] > 0} then {
      lappend prefixes $prefix
    }

    lappend prefixes [getLookupVarNamePrefix]

    foreach prefix $prefixes {
      if {[string length $prefix] == 0} then {
        set prefix ::; # TODO: Make non-global?
      }

      set varName [appendArgs $prefix api_keys]

    if {[info exists $varName]} then {
      return [set $varName]
    }
      if {[info exists $varName]} then {
        return [set $varName]
      }

    global env
    set varName [string trim $varName :]
      set varName [string trim $varName :]

    if {[info exists env($varName)]} then {
      return $env($varName)
      if {[info exists env($varName)]} then {
        return $env($varName)
      }
    }

    return [list]; # NOTE: System default, which is "public-only".
  }

  #
  # NOTE: This procedure returns the base URI for the package repository
1299
1300
1301
1302
1303
1304
1305
1306

1307
1308
1309
1310
1311
1312
1313
1315
1316
1317
1318
1319
1320
1321

1322
1323
1324
1325
1326
1327
1328
1329







-
+







  #
  # <public>
  proc getPackageFromRepository { package version caller } {
    #
    # NOTE: Get the list of API keys and try each one, in order, until
    #       the package is found.
    #
    set apiKeys [getLookupApiKeys]; lappend apiKeys ""
    set apiKeys [getApiKeys]; lappend apiKeys ""

    foreach apiKey $apiKeys {
      #
      # NOTE: Issue the lookup request to the remote package repository.
      #
      set data [getLookupData $apiKey $package $version]