Overview
Comment: | The package downloader client is now working again. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | pkgdSelfUpdate |
Files: | files | file ages | folders |
SHA1: |
e31d9b486a1fd3f899d194615759277f |
User & Date: | mistachkin on 2016-08-19 19:14:18 |
Other Links: | branch diff | manifest | tags |
Context
2016-08-19
| ||
19:37 | When downloading for a self-update, overwrite existing files. check-in: 09a7063c6e user: mistachkin tags: pkgdSelfUpdate | |
19:14 | The package downloader client is now working again. check-in: e31d9b486a user: mistachkin tags: pkgdSelfUpdate | |
04:51 | Refactoring work-in-progress on the package downloader client. check-in: 1b8b52e27d user: mistachkin tags: pkgdSelfUpdate | |
Changes
Modified client/1.0/pkgd.eagle from [d48f797d43] to [e00eecc8fc].
︙ | ︙ | |||
64 65 66 67 68 69 70 | if {![info exists downloadUri]} then { set downloadUri {${baseUri}?download&ci=trunk&filename=${fileName}} } # # NOTE: The root directory where any persistent packages will be saved. # | | | | > > > > > > > > > > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | if {![info exists downloadUri]} then { set downloadUri {${baseUri}?download&ci=trunk&filename=${fileName}} } # # NOTE: The root directory where any persistent packages will be saved. # variable persistentRootDirectory; # DEFAULT: [getPersistentRootDirectory] if {![info exists persistentRootDirectory]} then { set persistentRootDirectory [getPersistentRootDirectory] } # # NOTE: The root directory where any temporary packages will be written. # variable temporaryRootDirectory; # DEFAULT: [getFileTempDirectory PKGD_TEMP] if {![info exists temporaryRootDirectory]} then { set temporaryRootDirectory \ [::PackageRepository::getFileTempDirectory PKGD_TEMP] } } # # NOTE: This procedure returns the root directory where any packages that # are downloaded should be saved to permanent storage for subsequent # use. There are no arguments. |
︙ | ︙ | |||
94 95 96 97 98 99 100 | # the file to check, which may or may not exist. # proc isPgpSignatureFileName { fileName } { if {[string length $fileName] == 0} then { return false } | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | # the file to check, which may or may not exist. # proc isPgpSignatureFileName { fileName } { if {[string length $fileName] == 0} then { return false } set extension [file extension $fileName] if {$extension eq ".asc"} then { if {[file exists $fileName]} then { return [::PackageRepository::isPgpSignature [readFile $fileName]] } else { return true } |
︙ | ︙ | |||
117 118 119 120 121 122 123 | # of the file to check, which may or may not exist. # proc isHarpyCertificateFileName { fileName } { if {[string length $fileName] == 0} then { return false } | | | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | # of the file to check, which may or may not exist. # proc isHarpyCertificateFileName { fileName } { if {[string length $fileName] == 0} then { return false } set extension [file extension $fileName] if {$extension eq ".harpy"} then { if {[file exists $fileName]} then { return [::PackageRepository::isHarpyCertificate [readFile $fileName]] } else { return true } |
︙ | ︙ | |||
202 203 204 205 206 207 208 | # proc downloadOneFile { language version fileName localFileName usePgp } { variable baseUri variable downloadUri variable quiet # | | | > > > > | > | > | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | # proc downloadOneFile { language version fileName localFileName usePgp } { variable baseUri variable downloadUri variable quiet # # NOTE: First, build the full relative file name to download from # the remote package repository. # set fileName [file join $language $version $fileName] 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. # if {[isEagle]} then { writeFile $localFileName [interp readorgetscriptfile -- "" $uri] } else { writeFile $localFileName \ [::PackageRepository::getFileViaHttp $uri 10 stdout $quiet] } # # NOTE: Is use of OpenPGP for signature verification enabled? Also, # did we just download an OpenPGP signature file? # if {$usePgp && [isPgpSignatureFileName $localFileName]} then { # # NOTE: Attempt to verify the OpenPGP signature. If this fails, # an error is raised. # if {![::PackageRepository::verifyPgpSignature $localFileName]} then { error [appendArgs \ "bad PGP signature \"" $localFileName \"] } } } |
︙ | ︙ | |||
250 251 252 253 254 255 256 | # useAutoPath argument should be non-zero to modify the auto-path # to include the temporary or persistent directories containing # the downloaded files. # # <public> proc downloadFiles { language version fileNames persistent usePgp useAutoPath } { | < < < | | | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | # useAutoPath argument should be non-zero to modify the auto-path # to include the temporary or persistent directories containing # the downloaded files. # # <public> proc downloadFiles { language version fileNames persistent usePgp useAutoPath } { variable clientDirectory variable persistentRootDirectory variable temporaryRootDirectory set client false if {[string length $language] == 0 || $language eq "eagle"} then { if {$version ne "1.0"} then { error "unsupported Eagle version" } |
︙ | ︙ | |||
277 278 279 280 281 282 283 | } set client true } else { error "unsupported language" } | < < < < < < < < < < < | | | | < < < | | | > > | < | > | < | > > > > | > > > > > > | | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | } set client true } else { error "unsupported language" } set temporaryDirectory [file join $temporaryRootDirectory \ [appendArgs pkgd_ [string trim [pid] -] _ [string trim \ [clock seconds] -]]] if {$client} then { set persistentDirectory $clientDirectory } else { set persistentDirectory $persistentRootDirectory } set downloadedFileNames [list] foreach fileName $fileNames { if {[string length $fileName] == 0 || \ [file pathtype $fileName] ne "relative"} then { error [appendArgs \ "bad file name \"" $fileName "\", not relative"] } set directoryParts [file split [file dirname $fileName]] if {[llength $directoryParts] == 0} then { error [appendArgs \ "bad file name \"" $fileName "\", no directory parts"] } set directory(temporary) [file normalize [eval \ file join [list $temporaryDirectory] $directoryParts]] set directory(persistent) [file normalize [eval \ file join [list $persistentDirectory] $directoryParts]] set fileNameOnly [file tail $fileName] set downloadFileName [file normalize [file join \ $directory(temporary) $fileNameOnly]] if {[file exists $downloadFileName]} then { error [appendArgs \ "temporary file name \"" $downloadFileName \ "\" already exists"] } file mkdir [file dirname $downloadFileName] downloadOneFile $language $version $fileName $downloadFileName $usePgp lappend downloadedFileNames [list \ $fileNameOnly $directory(temporary) $directory(persistent)] if {$usePgp && ![isPgpSignatureFileName $downloadFileName]} then { downloadOneFile $language $version [appendArgs $fileName .asc] \ [appendArgs $downloadFileName .asc] $usePgp lappend downloadedFileNames [list \ [appendArgs $fileNameOnly .asc] $directory(temporary) \ $directory(persistent)] } } set downloadDirectories [list] foreach downloadedFileName $downloadedFileNames { set directory(temporary) [lindex $downloadedFileName 1] if {$persistent} then { set fileNameOnly [lindex $downloadedFileName 0] set directory(persistent) [lindex $downloadedFileName 2] file mkdir $directory(persistent) file copy -- \ [file join $directory(temporary) $fileNameOnly] \ [file join $directory(persistent) $fileNameOnly] lappend downloadDirectories $directory(persistent) } else { lappend downloadDirectories $directory(temporary) } } set downloadDirectories [lsort -unique $downloadDirectories] if {$useAutoPath} then { foreach downloadDirectory $downloadDirectories { |
︙ | ︙ |
Modified client/1.0/pkgd.eagle.harpy from [d275cf6011] to [24ba4af2c1].
︙ | ︙ | |||
17 18 19 20 21 22 23 | 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> | | | | | | | | | | | | | | | | | | | | | | 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 | 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> <Id>2cf31dc5-d48b-44f1-afad-103b81c554ef</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-19T19:13:42.5234844Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x2c322765603b5278</Key> <Signature> F2AmzOfG32K6r6W4k1oC5iIm/NKFrBb7Grdwc7jMYHna6N0BU5l62voPJPSNDZazj7XRCYebg6yj XHSRP68dY3aatxhQSoqvavirr1OZ/AmU2mFC00f5gGBk8/ERjfvs7fS9YoYGmjFQ8OMhRdyMNiWK sSOTmJb/vi7es2rNV0kZEQMkAX1v9Nbq5MJW5BryANn+PazCaC3eKBO9QSWaeBcIW2ORspf61kqN 8bj7vT5zPlX5xjHZUry/9U8dc+6Jfo6KYZPqvu5nViuu3S4bi4C2RG6zgxxyING+5BbuiRFDqUwl Ly4h/gPB/cNWfjc1sjO8lAExx6qQyIiV1muBV1aahcoxyia1c3L4OdvZVWzOpvvlw6hc18/EWZTK n/yB9/kvMFePImBrTS7OZrKJPciEUh9VsIcVOsTZa0Z0al5u46TDGV+lixPxuHeSHg7u2PWe5SNO gzbJYF+E1Nl62246HVB7IgWr82p3ZsI9ofFg1SefVWMPCArXokXl4buDYA2DbFXtYirTn3XpKlTc 3OqQudHZ13uqo0RfyK39lm1iqYIXAzFNwh53KbV1eGk7rmi1V3ne2sjsADYqor3WwvODUr+/huFu k4b3a1RhJd8B0lLCmXX09/3NAS9K5yfNErdyOjgM9Elf8myBOuBhsHkjZapopvHkuzfzsdE95YM4 +XXvoX/bQnKlb+nDlfDshEbvu7aUgaybyj5SkEn4Z9u2/1/E/L1EHtij7ObAOXDoc9/hvV0eOqzW NPSkkySEEToEA1TcC74Mq9lEnQ6cdWPmKN7IKsheM/X4BsQMBWRxOyO5zPsiqu0XunROWpahoJ/7 fS2bFk+Yd4B9j6gyOYVzD6YduNaGV6LCRwrseR3jmfhf6FMwIgl16/evrwJRytk1q284JrgPkUEM GYtlVBHMh5P+8rj9bmNygC8pPen37F5VkgTDZyiBbhdbOHe5xLQaMkfK2eW+foQo87p7UW1ft2rU 1wy/SEHKyetTr0Co/mG51XoxnnHWs7VLWdFWgbdZWFETgh6V65z0+sntGalLX+5XyuGC9PDSFYXi 7T70NQcXhBvZAL1fbh944I5bLGzUVga2mNi/68yhTLNoASfa6ZZMCwY9qjR/ciUOCXhxME65wGXu XcRmr4+lS+LP/81XTurBOJpkSe4yhpSpTIMh6B6CgFGiL2IYXOFW7s46Y7+pnySSHDNGQVCKhVt0 cjT/T8z/r8E6EknU2zDLKSPS98b87dH32Tc0C2+3p7sJBYss+Erxkike9XCMmAwv9rths9i8Clua HLqX1D+K2oNfyMHrUsyyA6Qv0TtuxAujB2tZggPN5/yoKcw4sH3fy6K1TflzHDo1sWRcMyJPjw== </Signature> </Certificate> |
Modified client/1.0/pkgr.eagle from [9dc3f0e9e9] to [ece670d676].
︙ | ︙ | |||
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | }] $value] != -1} then { return true } else { return false } } # # NOTE: This procedure returns a unique temporary file name. A script # error is raised if this task cannot be accomplished. There are # no arguments. # proc getFileTempName {} { if {[isEagle]} then { return [file tempname] } else { | > > > > > > > > > > > > > > > > > > > > > > < < < < < < < | < < < < | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | }] $value] != -1} then { return true } else { return false } } # # NOTE: This procedure returns the fully qualified name of the directory # where temporary files should be written. The envVarName argument # is an optional extra environment variable to check (first). # proc getFileTempDirectory { {envVarName ""} } { global env if {[string length $envVarName] > 0 && \ [info exists env($envVarName)]} then { return $env($envVarName) } elseif {[info exists env(TEMP)]} then { return $env(TEMP) } elseif {[info exists env(TMP)]} then { return $env(TMP) } else { error [appendArgs \ "please set " $envVarName \ " (via environment) to temporary directory"] } } # # NOTE: This procedure returns a unique temporary file name. A script # error is raised if this task cannot be accomplished. There are # no arguments. # proc getFileTempName {} { if {[isEagle]} then { return [file tempname] } else { set directory [getFileTempDirectory PKGR_TEMP] set counter [expr {[pid] ^ int(rand() * 0xFFFF)}] while {1} { set fileNameOnly [format tcl%04X.tmp $counter] set fileName [file join $directory $fileNameOnly] if {![file exists $fileName]} then { |
︙ | ︙ |
Modified client/1.0/pkgr.eagle.harpy from [8c0f96195a] to [041e568d84].
︙ | ︙ | |||
17 18 19 20 21 22 23 | 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> | | | | | | | | | | | | | | | | | | | | | | 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 | 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> <Id>c8d855d3-dc6c-4ff7-b559-6920bdc2c9ef</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-19T19:13:22.5840312Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x2c322765603b5278</Key> <Signature> JBC1xWLd8MNtAHcCpSmqGSmJHhqY2uwe0jbBGKS7vFoYEPueeYGUyLgp2ZUxjJj2jhMxAlkUd/zX mLpjzG3YNHCBRxPL1OvkOgn7Oi1bqz9QgJCUimh8vQkq0iGY9lL5GLdmcaBoRwJz1hbFlGhXv5LK TrwqAlJQ1Lzb7VZDgRmQpkjq//0m/4rTczf6uvihdKoV2bJRcrCxh6zTtdbbbfJNPMZy+4elb8I3 xP0EVoI9L1vB/XUGKLPLpD1hI2vDJVoa5RoM2W4FQZyAu7w/gXpno8I1rkhKoiICku9zlMsA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