Diff
Not logged in

Differences From Artifact [d5661a3c00]:

To Artifact [2dc38da858]:


60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    }
  }

  #
  # NOTE: This procedure emits a message to the package repository client
  #       log.  The string argument is the content of the message to emit.
  #
  # <public>
  proc pkgLog { string } {
    catch {
      tclLog [appendArgs [pid] " : " [clock seconds] " : pkgr : " $string]
    }
  }

  #







<







60
61
62
63
64
65
66

67
68
69
70
71
72
73
    }
  }

  #
  # NOTE: This procedure emits a message to the package repository client
  #       log.  The string argument is the content of the message to emit.
  #

  proc pkgLog { string } {
    catch {
      tclLog [appendArgs [pid] " : " [clock seconds] " : pkgr : " $string]
    }
  }

  #
127
128
129
130
131
132
133

134
135
136
137
138
139
140
  }

  #
  # NOTE: This procedure returns the fully qualified name of the directory
  #       where temporary files should be written.  The envVarName argument
  #       is an optional extra environment variable to check (first).
  #

  proc getFileTempDirectory { {envVarName ""} } {
    global env

    if {[string length $envVarName] > 0 && \
        [info exists env($envVarName)]} then {
      return $env($envVarName)
    } elseif {[info exists env(TEMP)]} then {







>







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
  }

  #
  # NOTE: This procedure returns the fully qualified name of the directory
  #       where temporary files should be written.  The envVarName argument
  #       is an optional extra environment variable to check (first).
  #
  # <public>
  proc getFileTempDirectory { {envVarName ""} } {
    global env

    if {[string length $envVarName] > 0 && \
        [info exists env($envVarName)]} then {
      return $env($envVarName)
    } elseif {[info exists env(TEMP)]} then {
218
219
220
221
222
223
224

225
226
227
228
229
230
231
  #       that is unique to the running process at the current point in
  #       time.  It is used (internally) to avoid name collisions with any
  #       preexisting variables or commands that may be present in the
  #       global namespace.  The paranoia argument represents the relative
  #       level of paranoia required by the caller; the higher this level,
  #       the more uniqueness is required.
  #

  proc getUniqueSuffix { {paranoia 1} } {
    set result [string trim [pid] -]

    if {$paranoia > 0} then {
      append result _ [string trim [clock seconds] -]
    }








>







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
  #       that is unique to the running process at the current point in
  #       time.  It is used (internally) to avoid name collisions with any
  #       preexisting variables or commands that may be present in the
  #       global namespace.  The paranoia argument represents the relative
  #       level of paranoia required by the caller; the higher this level,
  #       the more uniqueness is required.
  #
  # <public>
  proc getUniqueSuffix { {paranoia 1} } {
    set result [string trim [pid] -]

    if {$paranoia > 0} then {
      append result _ [string trim [clock seconds] -]
    }

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

  proc getLookupApiKeys {} {
    set varName [appendArgs [getLookupVarNamePrefix] api_keys]

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

    global env
    set varName [string trim $varName :]

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

    return [list]; # NOTE: System default, which is "public-only".
  }





  proc getLookupBaseUri {} {
    set varName [appendArgs [getLookupVarNamePrefix] base_uri]

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








>

















>
>
>
>







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

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

    global env
    set varName [string trim $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
  #       server.  There are no arguments.
  #
  proc getLookupBaseUri {} {
    set varName [appendArgs [getLookupVarNamePrefix] base_uri]

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

1187
1188
1189
1190
1191
1192
1193

1194
1195
1196
1197
1198
1199
1200
  #
  # NOTE: This procedure evaluates the package repository client settings
  #       script file, if it exists.  Any script errors raised are not
  #       masked.  The script argument must be the fully qualified path
  #       and file name for the primary package repository client script
  #       file.
  #

  proc maybeReadSettingsFile { script } {
    if {[string length $script] == 0 || \
        ![file exists $script] || ![file isfile $script]} then {
      return
    }

    set fileName [appendArgs \







>







1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
  #
  # NOTE: This procedure evaluates the package repository client settings
  #       script file, if it exists.  Any script errors raised are not
  #       masked.  The script argument must be the fully qualified path
  #       and file name for the primary package repository client script
  #       file.
  #
  # <public>
  proc maybeReadSettingsFile { script } {
    if {[string length $script] == 0 || \
        ![file exists $script] || ![file isfile $script]} then {
      return
    }

    set fileName [appendArgs \