Overview
Comment: | Remove some duplicated code. Reorganize some code. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
6a05f4832c522f251e757b4dbaeab958 |
User & Date: | mistachkin on 2016-10-31 01:19:35 |
Other Links: | manifest | tags |
Context
2016-10-31
| ||
01:21 | Fix a comment. check-in: 086029eb28 user: mistachkin tags: trunk | |
01:19 | Remove some duplicated code. Reorganize some code. check-in: 6a05f4832c user: mistachkin tags: trunk | |
00:39 | Fix platform detection for neutral packages in the downloader. Verify that OpenPGP is installed prior to calling it. check-in: 5652e4cf00 user: mistachkin tags: trunk | |
Changes
Modified client/1.0/neutral/pkgd.eagle from [9ace2abafb] to [8ca4ea040d].
︙ | |||
698 699 700 701 702 703 704 | 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } } } return "" } |
︙ | |||
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 | 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } else { file delete -force -- $temporaryDirectory } return [expr {$compare > 0}] } # # 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 downloads a manitest from the package file server, # writing its contents to the specified local file name. It can also # 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 |
︙ | |||
1128 1129 1130 1131 1132 1133 1134 | 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 | - + - - - - - - - - - - - - - - - - - | # 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. # |
︙ | |||
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } else { file delete -force -- $temporaryDirectory } return [lsort -unique $platforms] } # # 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 } { # # 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 && [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 \"] } } } # # NOTE: This procedure downloads a single file from the package file server, # writing its contents to the specified local file name. It can also # verify the OpenPGP signatures. When an OpenPGP signature file is # downloaded, this procedure assumes the corresponding data file was # already downloaded (i.e. since OpenPGP needs both to perform the # signature checks). The language argument must be one of the |
︙ | |||
1234 1235 1236 1237 1238 1239 1240 | 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 | - + - - - - - - - - - - - - - + + - - - - - + - - | # NOTE: First, build the full relative file name to download from # the remote package repository. # set fileName [file join $language $version $platform $fileName] set uri [subst $downloadUri] # |
︙ |
Modified client/1.0/neutral/pkgd.eagle.asc from [17f1a65acf] to [cc6c8d5e48].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgd.eagle.harpy from [8bbe23a216] to [7c27a35e91].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |
Modified client/1.0/neutral/pkgd.eagle.harpy.asc from [10600fc2ae] to [d141bdb1bf].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |