336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
return true
}
}
return false
}
#
# NOTE: This procedure returns the prefix for fully qualified variable
# names that MAY be present in the global namespace. There are
# no arguments.
#
proc getLookupVarNamePrefix {} {
return ::pkgr_; # TODO: Make non-global?
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
return true
}
}
return false
}
#
# NOTE: This procedure attempts to import the OpenPGP keys contained in
# the specified (named) file. Non-zero is only returned if the
# OpenPGP keys are imported successfully. A script error should
# not be raised by this procedure. The fileName argument must be
# the fully qualified path and file name of the OpenPGP key file
# to import. This procedure is only intended to be used from the
# "pkgr_setup.eagle" tool script and may go away in later versions
# of this package.
#
# <internal>
proc importOpenPgpKeyFile { fileName varName } {
variable openPgpImportCommand
variable openPgpImportPattern
if {[string length $varName] > 0} then {
upvar 1 $varName result
}
if {[isEagle]} then {
set fileName [appendArgs \" $fileName \"]
if {[catch {
eval exec -nocarriagereturns -stdout output -stderr error \
[subst $openPgpImportCommand]
} result] == 0} then {
set result [appendArgs $output $error]
} else {
return false
}
} else {
if {[catch {
eval exec [subst $openPgpImportCommand] 2>@1
} result]} then {
return false
}
}
if {![info exists result] || \
![regexp -line -- $openPgpImportPattern $result]} then {
return false
}
return true
}
#
# NOTE: This procedure returns the prefix for fully qualified variable
# names that MAY be present in the global namespace. There are
# no arguments.
#
proc getLookupVarNamePrefix {} {
return ::pkgr_; # TODO: Make non-global?
|
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
|
if {![isEagle] && \
[llength [package versions Garuda]] > 0} then {
set autoRequireGaruda true
} else {
set autoRequireGaruda false
}
}
#
# NOTE: The command to use when attempting to verify that OpenPGP is
# installed locally. This must be configured according to the
# implementation of OpenPGP in use.
#
variable openPgpInstalledCommand; # DEFAULT: gpg2 --version
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
|
if {![isEagle] && \
[llength [package versions Garuda]] > 0} then {
set autoRequireGaruda true
} else {
set autoRequireGaruda false
}
}
#
# NOTE: The command to use when attempting to import an OpenPGP key
# file. This must be configured according to the implementation
# of OpenPGP in use.
#
variable openPgpImportCommand; # DEFAULT: gpg2 --import
if {![info exists openPgpImportCommand]} then {
set openPgpImportCommand {gpg2 --import {${fileName}}}
}
#
# NOTE: The regular expression pattern used when attempting to verify
# that OpenPGP successfully imported one or more keys. This must
# be configured according to the implementation of OpenPGP in use.
#
variable openPgpImportPattern; # DEFAULT: ^gpg: Total number processed: 1$
if {![info exists openPgpImportPattern]} then {
set openPgpImportPattern {^gpg: Total number processed: 1$}
}
#
# NOTE: The command to use when attempting to verify that OpenPGP is
# installed locally. This must be configured according to the
# implementation of OpenPGP in use.
#
variable openPgpInstalledCommand; # DEFAULT: gpg2 --version
|