Overview
Comment: | Add command line tool (wrapper) that can pre-install packages. Fix the Package Downloader Client so that it will automatically create the necessary master package index for native Tcl when needed. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8101e57c80e63edcd2d52800e86241c8 |
User & Date: | mistachkin on 2016-09-10 22:05:21 |
Other Links: | manifest | tags |
Context
2016-09-10
| ||
23:16 | The package installer tool must manually enable 'package unknown' support when running in Eagle. Also, make sure the Eagle.Data package files are PGP signed. check-in: 43d107aab9 user: mistachkin tags: trunk | |
22:05 | Add command line tool (wrapper) that can pre-install packages. Fix the Package Downloader Client so that it will automatically create the necessary master package index for native Tcl when needed. check-in: 8101e57c80 user: mistachkin tags: trunk | |
06:20 | Avoid making superfluous changes to the Eagle auto-path during the package bootstrap phase. check-in: 506829dcf7 user: mistachkin tags: trunk | |
Changes
Modified client/1.0/pkgd.eagle from [bba4803a0e] to [eccf995f19].
︙ | |||
137 138 139 140 141 142 143 144 145 146 147 148 149 150 | 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 | + + + + + + + + + + + | # variable temporaryRootDirectory; # DEFAULT: [getFileTempDirectory PKGD_TEMP] if {![info exists temporaryRootDirectory]} then { set temporaryRootDirectory \ [::PackageRepository::getFileTempDirectory PKGD_TEMP] } # # NOTE: Is this package being run by the package installer tool? If so, # all downloaded packages should be automatically persisted to the # library path. # variable viaInstall; # DEFAULT: false if {![info exists viaInstall]} then { set viaInstall false } } # # NOTE: This procedure escapes a single name/value pair for use in a URI # query string. The name argument is the name of the parameter. # The value argument is the value of the parameter. # |
︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 180 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 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 251 252 253 254 255 256 257 258 259 260 261 262 263 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | proc getPersistentRootDirectory {} { # # NOTE: Return a directory parallel to the one containing the library # directory. # return [file join [file dirname [info library]] pkgd] } # # NOTE: This procedure, which is only used with native Tcl, generates a # package index file (i.e. "pkgIndex.tcl") suitable for use with # native Tcl, 8.4 or higher. It will recursively [source] other # native Tcl package index files that are within the configured # persistent root directory, thereby causing all packages located # within it to become available. Since Eagle (by default) already # performs a recursive search for its package index files, this # procedure is not necessary for Eagle packages. # proc maybeCreateMasterTclPackageIndex {} { variable persistentRootDirectory if {![info exists persistentRootDirectory]} then { error "persistent root directory not set" } if {[string length $persistentRootDirectory] == 0} then { error "persistent root directory is invalid" } if {![file isdirectory $persistentRootDirectory]} then { error "persistent root directory does not exist" } set fileName [file join $persistentRootDirectory pkgIndex.tcl] if {[file exists $fileName]} then { return false } writeFile $fileName [string trim [string map [list \r\n \n] { ############################################################################### # # pkgIndex.tcl -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Generated Recursive Package Index File -- PLEASE DO NOT EDIT # # Copyright (c) 2007-2012 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### if {![package vsatisfies [package provide Tcl] 8.4]} {return} if {[string length [package provide Eagle]] > 0} then {return} set pkgd(savedDir) $dir; set pkgd(dirs) [list $pkgd(savedDir)] for {set pkgd(i) 0} {$pkgd(i) < [llength $pkgd(dirs)]} {incr pkgd(i)} { set pkgd(dir) [lindex $pkgd(dirs) $pkgd(i)] if {$pkgd(i) > 0} then { set pkgd(file) [file join $pkgd(dir) pkgIndex.tcl] if {[file exists $pkgd(file)]} then { set dir $pkgd(dir); source $pkgd(file) } } eval lappend pkgd(dirs) \ [glob -nocomplain -types {d} [file join $pkgd(dir) *]] } set dir $pkgd(savedDir); unset -nocomplain pkgd }]] } # # NOTE: This procedure returns non-zero if the specified file seems to be # an OpenPGP signature file. The fileName argument is the name of # the file to check, which may or may not exist. The nameOnly # argument should be non-zero to ignore the contents of the file. # |
︙ | |||
622 623 624 625 626 627 628 629 630 631 632 633 634 635 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | + | # # <public> proc downloadFiles { language version fileNames persistent usePgp useAutoPath } { variable clientDirectory variable persistentRootDirectory variable temporaryRootDirectory variable viaInstall verifyLanguageAndVersion $language $version isClient set temporaryDirectory [file join \ $temporaryRootDirectory [appendArgs \ pkgd_lib_ [::PackageRepository::getUniqueSuffix]]] |
︙ | |||
689 690 691 692 693 694 695 | 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - + | } set downloadDirectories [list] foreach downloadedFileName $downloadedFileNames { set directory(temporary) [lindex $downloadedFileName 1] |
︙ | |||
720 721 722 723 724 725 726 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | - + + | if {$useAutoPath} then { foreach downloadDirectory $downloadDirectories { addToAutoPath $language $downloadDirectory } } |
︙ |
Modified client/1.0/pkgd.eagle.asc from [b78f378ac8] to [49672f243a].
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/pkgd.eagle.harpy from [b6935482f4] to [b322884695].
︙ | |||
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/pkgd.eagle.harpy.asc from [b9e30e44b8] to [d89fd48679].
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/pkgr.eagle from [1644fc87ef] to [4a18bc9657].
︙ | |||
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | 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 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 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 | + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + | # # NOTE: This procedure, which may only be used from an Eagle script, checks # if a native Tcl library is loaded and ready. If not, a script error # is raised. # proc tclMustBeReady {} { # # NOTE: This procedure is useless when running in native Tcl; therefore, # forbid its use there. # if {![isEagle]} then { error "already running in Tcl language" } # # NOTE: This procedure is not allowed to actually load a native Tcl # library; therefore, one must already be loaded. # if {![tcl ready]} then { error "cannot use Tcl language, supporting library is not loaded" } } # # NOTE: This procedure is designed for Eagle. It attempts to load the # "best" native Tcl library. It may raise any number of script # errors. # proc makeTclReady {} { # # NOTE: This procedure is useless when running in native Tcl; therefore, # forbid its use there. # if {![isEagle]} then { error "already running in Tcl language" } # # NOTE: Load a native Tcl library. It absolutely must be signed with a |
︙ | |||
1117 1118 1119 1120 1121 1122 1123 | 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | - - - - - + - - - - - + | variable autoRequireGaruda # # NOTE: Should we attempt to automatically load the Garuda package for # native Tcl? # if {$autoRequireGaruda && ![isEagle] && [isWindows]} then { |
︙ |
Modified client/1.0/pkgr.eagle.asc from [f2f003c07a] to [d14edbf48d].
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/pkgr.eagle.harpy from [e9d0c39554] to [f639b657ea].
︙ | |||
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/pkgr.eagle.harpy.asc from [fdb1987ac7] to [5aae92b3f7].
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 |
Added client/1.0/pkgr_install.eagle version [122d13dfb5].