Diff
Not logged in

Differences From Artifact [f75ad80cb6]:

To Artifact [1efe4aeeff]:


540
541
542
543
544
545
546
547



548
549
550
551
552
553
554
540
541
542
543
544
545
546

547
548
549
550
551
552
553
554
555
556







-
+
+
+







      #
      # NOTE: Attempt to download the Package Signing Keys using the
      #       configured URI.
      #
      if {[catch {
        #
        # NOTE: First, build the actual URI where the Package Signing
        #       Keys should be obtained.
        #       Keys should be obtained, performing any applicable
        #       substitutions in the URI prior to using it as the
        #       basis for downloading the Package Signing Keys file.
        #
        set uri [subst $substUri]

        #
        # NOTE: Then, in one step, download the file from the package
        #       file server and write it to the specified local file.
        #
1216
1217
1218
1219
1220
1221
1222
1223



1224
1225
1226
1227
1228
1229
1230
1218
1219
1220
1221
1222
1223
1224

1225
1226
1227
1228
1229
1230
1231
1232
1233
1234







-
+
+
+







  proc resetCookieAndLogin { userName password } {
    variable baseUri
    variable loginCookie
    variable loginUri
    variable loginUrn

    #
    # NOTE: Build the full URI for the login request.
    # NOTE: Build the full URI for the login request, performing any
    #       applicable substitutions in the URI prior to using it as
    #       the basis for logging into the repository.
    #
    set uri [subst $loginUri]

    #
    # NOTE: Reset the old login cookie, if any.  Then, issue a new login
    #       request, capturing the raw response data.
    #
1274
1275
1276
1277
1278
1279
1280
1281



1282
1283
1284
1285
1286
1287
1288
1278
1279
1280
1281
1282
1283
1284

1285
1286
1287
1288
1289
1290
1291
1292
1293
1294







-
+
+
+







    # NOTE: Attempt to verify that we are currently logged in.
    #
    if {![info exists loginCookie] || [llength $loginCookie] != 2} then {
      error "missing or invalid login cookie"
    }

    #
    # NOTE: Build the full URI for the logout request.
    # NOTE: Build the full URI for the logout request, performing any
    #       applicable substitutions in the URI prior to using it as
    #       the basis for logging out of the repository.
    #
    set authToken [lindex $loginCookie 1]
    set uri [subst $logoutUri]

    #
    # NOTE: Reset the old login cookie, if any.  Then, issue a new login
    #       request, capturing the raw response data.
1421
1422
1423
1424
1425
1426
1427





1428
1429
1430
1431
1432
1433
1434
1435
1436
1437


1438
1439
1440
1441
1442
1443
1444
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447

1448
1449
1450
1451
1452
1453
1454
1455
1456







+
+
+
+
+









-
+
+







  proc downloadAllPlatforms { language version packageName fileNames usePgp } {
    variable baseUri
    variable branchName
    variable platformsUri
    variable platformsUrn
    variable temporaryRootDirectory

    #
    # NOTE: Verify that the package language and version are correct.
    #
    verifyLanguageAndVersion $language $version isClient

    set temporaryDirectory [file join \
        $temporaryRootDirectory [appendArgs \
        pkgd_plat_ [::PackageRepository::getUniqueSuffix]]]

    set localFileName [file join $temporaryDirectory manifest.txt]
    file mkdir [file dirname $localFileName]

    #
    # NOTE: First, build the final URI to download from the remote package
    #       repository.
    #       repository, performing any applicable substitutions in the URI
    #       prior to using it as the basis for fetching the platform list.
    #
    set uri [subst $platformsUri]

    #
    # NOTE: Then, in one step, download the file from the package file
    #       server and write it to the specified local file.
    #
1468
1469
1470
1471
1472
1473
1474








1475
1476
1477
1478
1479
1480
1481
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501







+
+
+
+
+
+
+
+







    }

    if {[string length $packageName] > 0} then {
      set pattern [file join $language $version * $packageName *]
    } else {
      set pattern [file join $language $version *]
    }

    #
    # NOTE: For package files that are not part of the client package,
    #       put them inside the "packages" sub-directory.
    #
    if {!$isClient} then {
      set pattern [file join packages $pattern]
    }

    foreach line $lines {
      if {[string range $line 0 1] eq "F "} then {
        set fileName [lindex [split $line " "] 1]

        if {[string match $pattern $fileName]} then {
          set directory [lindex [file split $fileName] 2]
1554
1555
1556
1557
1558
1559
1560







1561
1562
1563
1564
1565













1566
1567
1568
1569
1570
1571
1572
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612







+
+
+
+
+
+
+





+
+
+
+
+
+
+
+
+
+
+
+
+







  proc downloadOneFile {
          language version platform fileName localFileName usePgp } {
    variable baseUri
    variable branchName
    variable downloadUri
    variable downloadUrn

    #
    # NOTE: Verify that the package language, version, and platform are
    #       correct.
    #
    verifyLanguageAndVersion $language $version isClient
    verifyPlatform $platform platform

    #
    # NOTE: First, build the full relative file name to download from
    #       the remote package repository.
    #
    set fileName [file join $language $version $platform $fileName]

    #
    # NOTE: For package files that are not part of the client package,
    #       put them inside the "packages" sub-directory.
    #
    if {!$isClient} then {
      set fileName [file join packages $fileName]
    }

    #
    # NOTE: Perform any applicable substitutions in the URI prior to
    #       using it as the basis for downloading the package file.
    #
    set uri [subst $downloadUri]

    #
    # NOTE: Then, in one step, download the file from the package file
    #       server and write it to the specified local file.
    #
    downloadOneUriToFile $localFileName $uri $usePgp