Diff
Not logged in

Differences From Artifact [3414d7200c]:

To Artifact [a5ca57ad83]:


570
571
572
573
574
575
576
577

578
579
580
581
582
583
584
570
571
572
573
574
575
576

577
578
579
580
581
582
583
584







-
+







        #
        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.
        #
        downloadOneUriToFile $fileName $uri false
        downloadOneUriToFile $fileName $uri false false
      } result] == 0} then {
        #
        # NOTE: Ok, success.  We are done.
        #
        return ""
      } else {
        #
1493
1494
1495
1496
1497
1498
1499
1500



1501
1502

1503
1504
1505
1506
1507
1508
1509
1493
1494
1495
1496
1497
1498
1499

1500
1501
1502
1503

1504
1505
1506
1507
1508
1509
1510
1511







-
+
+
+

-
+







    #       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.
    #       server and write it to the specified local file.  Also, make
    #       sure it has a valid OpenPGP signature because all manifests on
    #       the server should be signed.
    #
    downloadOneUriToFile $localFileName $uri $usePgp
    downloadOneUriToFile $localFileName $uri $usePgp true

    #
    # NOTE: Initialize list of platforms to return.  This will be populated
    #       based on the platform directories available in the downloaded
    #       manfiest data.
    #
    set platforms [list]
1565
1566
1567
1568
1569
1570
1571
1572

1573
1574
1575
1576
1577
1578
1579
1580
1581
1582

1583

1584
1585
1586
1587
1588
1589
1590
1567
1568
1569
1570
1571
1572
1573

1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585

1586
1587
1588
1589
1590
1591
1592
1593







-
+










+
-
+







  # NOTE: This procedure downloads a single URI from the package file server
  #       and writes the result to a local file.  The localFileName argument
  #       is the file name where the downloaded file should be written.  The
  #       The uri argument is the URI to download.  The usePgp argument should
  #       be non-zero when the OpenPGP signature file needs to be verified for
  #       the downloaded file.  The return value is undefined.
  #
  proc downloadOneUriToFile { localFileName uri usePgp } {
  proc downloadOneUriToFile { localFileName uri usePgp forcePgp } {
    #
    # NOTE: Then, in one step, download the URI from the package file
    #       server and write it to the specified local file.
    #
    writeFile $localFileName [getPackageFile $uri]

    #
    # NOTE: Is use of OpenPGP for signature verification enabled?  Also,
    #       did we just download an OpenPGP signature file?
    #
    if {$usePgp && ($forcePgp || \
    if {$usePgp && [isOpenPgpSignatureFileName $localFileName true]} then {
        [isOpenPgpSignatureFileName $localFileName true])} then {
      #
      # NOTE: Attempt to verify the OpenPGP signature.  If this fails,
      #       an error is raised.
      #
      ::PackageRepository::probeForOpenPgpInstallation
      ::PackageRepository::openPgpMustBeInstalled

1650
1651
1652
1653
1654
1655
1656
1657

1658
1659
1660
1661
1662
1663
1664
1653
1654
1655
1656
1657
1658
1659

1660
1661
1662
1663
1664
1665
1666
1667







-
+







    #
    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
    downloadOneUriToFile $localFileName $uri $usePgp false
  }

  #
  # NOTE: This procedure attempts to download a list of files, optionally
  #       persistening them for subsequent uses by the target language.
  #       The language argument must be one of the literal strings "eagle",
  #       "tcl", or "client".  The version argument must be one of the
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715












1716
1717
1718
1719
1720
1721
1722
1686
1687
1688
1689
1690
1691
1692












1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725







-
-
-
-
-
-
-
-
-
-
-
-














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







  #
  # <public>
  proc downloadFiles { language version platform fileNames options } {
    variable clientDirectory
    variable persistentRootDirectory
    variable viaInstall

    verifyLanguageAndVersion $language $version isClient
    verifyPlatform $platform platform

    set temporaryDirectory [getUniqueTempDirectory pkgd_lib_]

    if {$isClient} then {
      set persistentDirectory $clientDirectory
    } else {
      verifyPersistentRootDirectory
      set persistentDirectory $persistentRootDirectory
    }

    set persistent [string is true -strict \
        [getDictionaryValue $options -persistent]]

    set overwrite [string is true -strict \
        [getDictionaryValue $options -overwrite]]

    set usePgp [string is true -strict \
        [getDictionaryValue $options -usePgp]]

    set useAutoPath [string is true -strict \
        [getDictionaryValue $options -useAutoPath]]

    set allowUpdate [string is true -strict \
        [getDictionaryValue $options -allowUpdate]]

    verifyLanguageAndVersion $language $version isClient
    verifyPlatform $platform platform

    set temporaryDirectory [getUniqueTempDirectory pkgd_lib_]

    if {$isClient} then {
      set persistentDirectory $clientDirectory
    } else {
      verifyPersistentRootDirectory
      set persistentDirectory $persistentRootDirectory
    }

    set downloadedFileNames [list]

    foreach fileName $fileNames {
      if {[string length $fileName] == 0 || \
          [file pathtype $fileName] ne "relative"} then {
        error [appendArgs \