Diff
Not logged in

Differences From Artifact [2e856ff1bf]:

To Artifact [e9b83bda0d]:


16
17
18
19
20
21
22










23
24
25
26
27
28
29

#
# NOTE: Use our own namespace here because even though we do not directly
#       support namespaces ourselves, we do not want to pollute the global
#       namespace if this script actually ends up being evaluated in Tcl.
#
namespace eval ::PackageDownloader {










  #
  # NOTE: This procedure sets up the default values for all URN configuration
  #       parameters used by the package downloader client.  If the force
  #       argument is non-zero, any existing values will be overwritten and
  #       set back to their default values.
  #
  proc setupDownloadServerVars { force } {







>
>
>
>
>
>
>
>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

#
# NOTE: Use our own namespace here because even though we do not directly
#       support namespaces ourselves, we do not want to pollute the global
#       namespace if this script actually ends up being evaluated in Tcl.
#
namespace eval ::PackageDownloader {
  #
  # NOTE: This procedure emits a message to the package downloader client
  #       log.  The string argument is the content of the message to emit.
  #
  proc pkgLog { string } {
    catch {
      tclLog [appendArgs [pid] " : " [clock seconds] " : pkgd : " $string]
    }
  }

  #
  # NOTE: This procedure sets up the default values for all URN configuration
  #       parameters used by the package downloader client.  If the force
  #       argument is non-zero, any existing values will be overwritten and
  #       set back to their default values.
  #
  proc setupDownloadServerVars { force } {
223
224
225
226
227
228
229










230
231
232
233
234
235
236
    #       from the repository, etc?  By default, this is enabled.
    #
    variable quiet; # DEFAULT: true

    if {![info exists quiet]} then {
      set quiet true
    }











    #
    # NOTE: The user name for the public account on the package file server.
    #       If this is an empty string, there is no public account.
    #
    variable publicUserName; # DEFAULT: public








>
>
>
>
>
>
>
>
>
>







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    #       from the repository, etc?  By default, this is enabled.
    #
    variable quiet; # DEFAULT: true

    if {![info exists quiet]} then {
      set quiet true
    }

    #
    # NOTE: Emit diagnostic messages when a new temporary directory name is
    #       created.
    #
    variable verboseTemporaryDirectory; # DEFAULT: false

    if {![info exists verboseTemporaryDirectory]} then {
      set verboseTemporaryDirectory false
    }

    #
    # NOTE: The user name for the public account on the package file server.
    #       If this is an empty string, there is no public account.
    #
    variable publicUserName; # DEFAULT: public

1320
1321
1322
1323
1324
1325
1326

1327
1328
1329
1330
1331
1332
1333
1334
1335
1336








1337
1338
1339
1340
1341
1342
1343
  # NOTE: This procedure returns a unique temporary directory where one or
  #       more files may be saved.  The prefix argument is a prefix for the
  #       directory name and it may be an empty string.  There is no attempt
  #       to actually create the resulting directory.
  #
  proc getUniqueTempDirectory { {prefix ""} } {
    variable temporaryRootDirectory


    set suffix [::PackageRepository::getUniqueSuffix]

    if {[string length $prefix] > 0} then {
      return [file join $temporaryRootDirectory \
          [appendArgs $prefix $suffix]]
    } else {
      return [file join $temporaryRootDirectory \
          $suffix]
    }








  }

  #
  # NOTE: This procedure checks if there is a higher version available of the
  #       specified package on the package file server.  The language argument
  #       must be one of the literal strings "eagle", "tcl", or "client".  The
  #       version argument must be one of the literal strings "8.4", "8.5", or







>




|


|


>
>
>
>
>
>
>
>







1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
  # NOTE: This procedure returns a unique temporary directory where one or
  #       more files may be saved.  The prefix argument is a prefix for the
  #       directory name and it may be an empty string.  There is no attempt
  #       to actually create the resulting directory.
  #
  proc getUniqueTempDirectory { {prefix ""} } {
    variable temporaryRootDirectory
    variable verboseTemporaryDirectory

    set suffix [::PackageRepository::getUniqueSuffix]

    if {[string length $prefix] > 0} then {
      set result [file join $temporaryRootDirectory \
          [appendArgs $prefix $suffix]]
    } else {
      set result [file join $temporaryRootDirectory \
          $suffix]
    }

    if {$verboseTemporaryDirectory} then {
      pkgLog [appendArgs \
          "returning temporary directory name \"" $result \
          "\" for prefix \"" $prefix \"...]
    }

    return $result
  }

  #
  # NOTE: This procedure checks if there is a higher version available of the
  #       specified package on the package file server.  The language argument
  #       must be one of the literal strings "eagle", "tcl", or "client".  The
  #       version argument must be one of the literal strings "8.4", "8.5", or