︙ | | |
698
699
700
701
702
703
704
705
706
707
708
709
710
711
|
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
}
}
}
return ""
}
#
# NOTE: This procedure attempts to guess a package name based on a list of
# its files. It relies upon the fact that all packages must include
# a package index file. The language argument must be one of the
# literal strings "eagle", "tcl", or "client". The fileNames argument
# must be the list of file names to be downloaded. The package name,
# if one can be detected, is returned; otherwise, an empty string will
# be returned.
#
proc guessPackageNameFromFileNames { language fileNames } {
set packageIndexFileName [getPackageIndexFileName $language]
if {[string length $packageIndexFileName] > 0} then {
foreach fileName $fileNames {
set fileNameOnly [file tail $fileName]
if {$fileNameOnly eq $packageIndexFileName} then {
set directory [file dirname $fileName]
if {[string length $directory] > 0} then {
return [file tail $directory]
}
}
}
}
return ""
}
#
# NOTE: This procedure verifies the platform specified by the caller. The
# platform argument must be an empty string -OR- one of the literal
# strings "neutral", "win32-arm", "win32-x86", "win64-arm64",
# "win64-ia64", or "win64-x64". An empty string means that the
# associated entity does not require a specific platform. The
# varName argument is the name of a variable in the context of the
|
︙ | | |
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
|
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
|
+
+
+
+
+
+
+
+
-
+
|
upvar 1 packageName packageName
if {[info exists packageName]} then {
set localPackageName $packageName
} else {
set localPackageName ""
}
upvar 1 fileNames fileNames
if {[info exists fileNames]} then {
set localFileNames $fileNames
} else {
set localFileNames [list]
}
upvar 1 usePgp usePgp
if {[info exists usePgp]} then {
set localUsePgp $usePgp
} else {
set localUsePgp false
}
#
# NOTE: Download the list of platforms associated with this package
# from the package repository server. This may fail and raise
# a script error.
#
set platforms [downloadAllPlatforms \
$language $version $localPackageName $localUsePgp]
$language $version $localPackageName $localFileNames $localUsePgp]
if {[string length $varName] > 0} then {
upvar 1 $varName newPlatform
}
#
# NOTE: Check the current platform and the neutral platform, in that
|
︙ | | |
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
|
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
|
-
-
-
+
+
+
-
-
+
|
# verify the OpenPGP signature. 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 "8.6"
# when the language is "tcl" -OR- the literal string "1.0" when the
# language is either "eagle" or "client". The packageName argument
# is a directory name relative to the language and version-specific
# directory on the package file server and may be an empty string.
# The localFileName argument is the file name where the downloaded
# file should be written. The usePgp argument should be non-zero
# when an OpenPGP signature needs to be verified for the downloaded
# The fileNames argument is the list of file names to be downloaded.
# The usePgp argument should be non-zero when an OpenPGP signature
# needs to be verified for the downloaded file.
# file.
#
proc downloadAllPlatforms { language version packageName usePgp } {
proc downloadAllPlatforms { language version packageName fileNames usePgp } {
variable baseUri
variable platformsUri
variable platformsUrn
variable temporaryRootDirectory
set temporaryDirectory [file join \
$temporaryRootDirectory [appendArgs \
|
︙ | | |
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
|
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
|
+
+
|
# did we just download an OpenPGP signature file?
#
if {$usePgp && [isOpenPgpSignatureFileName $localFileName true]} then {
#
# NOTE: Attempt to verify the OpenPGP signature. If this fails,
# an error is raised.
#
::PackageRepository::openPgpMustBeInstalled
if {![::PackageRepository::verifyOpenPgpSignature $localFileName]} then {
error [appendArgs \
"bad OpenPGP signature \"" $localFileName \"]
}
}
#
|
︙ | | |
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
|
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
+
+
+
+
|
#
# NOTE: Figure out the pattern to use when matching against the file
# names in the manifest data. If available, this will include
# the package name; otherwise, platform names for all packages
# will be considered.
#
if {[string length $packageName] == 0} then {
set packageName [guessPackageNameFromFileNames $language $fileNames]
}
if {[string length $packageName] > 0} then {
set pattern [file join $language $version * $packageName *]
} else {
set pattern [file join $language $version *]
}
foreach line $lines {
|
︙ | | |
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
|
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
|
+
+
|
# did we just download an OpenPGP signature file?
#
if {$usePgp && [isOpenPgpSignatureFileName $localFileName true]} then {
#
# NOTE: Attempt to verify the OpenPGP signature. If this fails,
# an error is raised.
#
::PackageRepository::openPgpMustBeInstalled
if {![::PackageRepository::verifyOpenPgpSignature $localFileName]} then {
error [appendArgs \
"bad OpenPGP signature \"" $localFileName \"]
}
}
}
|
︙ | | |