Overview
Context
Changes
Modified client/pkgr.eagle
from [0ed7e11999]
to [0f2d183af8].
︙ | | |
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
-
+
-
-
+
+
-
+
|
}
}
return false
}
proc getLookupVarNamePrefix {} {
return ::rpkg_; # TODO: Make non-global?
return ::pkgr_; # TODO: Make non-global?
}
proc getLookupVarNameSuffix {} {
return [appendArgs \
[string trim [pid] -] _ [string trim [clock seconds] -] _ \
[string trim [clock clicks -milliseconds] -]]; # TODO: Bad?
}
proc getLookupApiKey {} {
set varName [appendArgs [getLookupVarNamePrefix] api_key]
proc getLookupApiKeys {} {
set varName [appendArgs [getLookupVarNamePrefix] api_keys]
if {[info exists $varName]} then {
return [set $varName]
}
global env
set varName [string trim $varName :]
if {[info exists env($varName)]} then {
return $env($varName)
}
return ""; # NOTE: System default, which is "public".
return [list]; # NOTE: System default, which is "public-only".
}
proc getLookupBaseUri {} {
set varName [appendArgs [getLookupVarNamePrefix] base_uri]
if {[info exists $varName]} then {
return [set $varName]
|
︙ | | |
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
+
+
+
+
+
+
+
|
append requirement .0
}
return $requirement
}
proc getLookupData { apiKey package version } {
variable verboseUriDownload
set uri [getLookupUri $apiKey $package $version]
if {[string length $uri] == 0} then {
return ""
}
if {$verboseUriDownload} then {
pkgLog [appendArgs \
"attempting to download URI \"" $uri \"...]
}
if {[isEagle]} then {
set data [uri download -inline $uri]
} else {
variable quiet
set data [getFileViaHttp $uri 10 stdout $quiet]
|
︙ | | |
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
|
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
-
+
-
+
|
#
# NOTE: Create common cleanup script block that deletes any temporary
# files created for the script verification process.
#
set script(cleanup) {
if {[string length $fileName(2)] > 0 && \
[file exists $fileName(2)]} then {
if {![info exists ::env(rpkg_keep_files)]} then {
if {![info exists ::env(pkgr_keep_files)]} then {
catch {file delete $fileName(2)}
}
unset -nocomplain fileName(2)
}
if {[string length $fileName(1)] > 0 && \
[file exists $fileName(1)]} then {
if {![info exists ::env(rpkg_keep_files)]} then {
if {![info exists ::env(pkgr_keep_files)]} then {
catch {file delete $fileName(1)}
}
unset -nocomplain fileName(1)
}
}
#
|
︙ | | |
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
|
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
|
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
|
# is called?
#
variable verboseUnknownResult; # DEFAULT: false
if {![info exists verboseUnknownResult]} then {
set verboseUnknownResult false
}
}
#
# NOTE: Emit diagnostic messages when a URI is fetched?
#
variable verboseUriDownload; # DEFAULT: false
if {![info exists verboseUriDownload]} then {
set verboseUriDownload true
}
}
proc main { package version caller } {
#
# NOTE: Get the list of API keys and try each one, in order, until
# the package is found.
#
set apiKeys [getLookupApiKeys]; lappend apiKeys ""
foreach apiKey $apiKeys {
#
# NOTE: Issue the lookup request to the remote package repository.
#
set data [getLookupData \
[getLookupApiKey] $package [getLookupVersion $version]]
# NOTE: Issue the lookup request to the remote package repository.
#
set data [getLookupData \
$apiKey $package [getLookupVersion $version]]
#
# NOTE: Attempt to grab the lookup code from the response data.
#
set code [getLookupCodeFromData $data]
#
# NOTE: Attempt to grab the lookup code from the response data.
#
set code [getLookupCodeFromData $data]
#
# NOTE: Did the lookup operation fail?
#
if {[isLookupCodeOk $code]} then {
break
}
}
#
# NOTE: Attempt to grab the lookup data from the response data.
# Upon failure, this should contain the error message.
#
set result [getLookupResultFromData $data]
|
︙ | | |
Modified client/pkgr.eagle.harpy
from [6ca32d7096]
to [fa937e4643].
︙ | | |
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
|
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>d4dc6ffe-bc7d-4c54-bd96-1da84e25c234</Id>
<Id>bfdbe096-dec1-44fd-8613-e85207fd978f</Id>
<HashAlgorithm>SHA512</HashAlgorithm>
<EntityType>Script</EntityType>
<TimeStamp>2016-08-17T06:17:49.1208516Z</TimeStamp>
<TimeStamp>2016-08-17T17:57:27.3230000Z</TimeStamp>
<Duration>-1.00:00:00</Duration>
<Key>0x2c322765603b5278</Key>
<Signature>
mqfa05JZihxfZKfsZS539KGRnp/ssOS+8aJ4W4ydW8vbhhKmuyYS40KEyorMx8SpMpeHLW5FKjL2
vWhnRFA9vMRbISIZnxFZpD36TIWtCYBKRKuVqsW1r9ktGuiJlm5UmC1H9Vt5QJ0xS1o8DWJWhA9F
3BGzEbP6v85zGYHexd7PAx5ejrxj5I3BomC1HmQdR0ASJXDP9bPlbTxIe79qT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