Overview
Comment: | Make sure the 'directory' local variable is set for use with 'subst' for native Tcl (i.e. as well as Eagle). Add procedure to verify that Fossil is installed prior to attempting to use it. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4a82ecb4c71a61b64424cb7d46dec7b7 |
User & Date: | mistachkin on 2016-12-23 21:14:43 |
Other Links: | manifest | tags |
Context
2016-12-23
| ||
21:26 | Improve error reporting for the package metadata submission phase. check-in: a854269f3d user: mistachkin tags: trunk | |
21:14 | Make sure the 'directory' local variable is set for use with 'subst' for native Tcl (i.e. as well as Eagle). Add procedure to verify that Fossil is installed prior to attempting to use it. check-in: 4a82ecb4c7 user: mistachkin tags: trunk | |
04:37 | Enable package submissions in the uploader client. Modify name prefix for Tk label widgets. check-in: 9c01f58e6f user: mistachkin tags: trunk | |
Changes
Modified client/1.0/neutral/pkgr_upload.eagle from [f9abe24483] to [514835c60a].
︙ | |||
69 70 71 72 73 74 75 76 77 78 79 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | + + + + + + + + + + + + + + + + + + + + - + - + | # variable scriptDirectory; # DEFAULT: <scriptDir> if {![info exists scriptDirectory]} then { set scriptDirectory $pkgr_path } # # NOTE: The command to use when attempting to verify that Fossil is # available for use. # variable fossilVersionCommand; # DEFAULT: fossil version if {![info exists fossilVersionCommand]} then { set fossilVersionCommand {fossil version} } # # NOTE: The regular expression pattern used when attempting to verify # that Fossil is installed. # variable fossilVersionPattern; # DEFAULT: {^This is fossil version 1\.\d+ } if {![info exists fossilVersionPattern]} then { set fossilVersionPattern {^This is fossil version 1\.\d+ } } # # NOTE: The command to use when attempting to check for changes prior to # staging files using Fossil. # |
︙ | |||
135 136 137 138 139 140 141 | 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 181 182 183 184 185 186 187 188 189 190 191 | - + - + - + | set fossilInfoTagsPattern {^tags:\s+trunk(?:,|$)} } # # NOTE: The command to use when attempting to reset the checkout to the # default branch prior to staging files using Fossil. # |
︙ | |||
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | + + + + | # the root directory of the Fossil checkout cannot be determined. # proc getCheckoutDirectory {} { variable fossilInfoCommand variable fossilInfoLocalRootPattern variable scriptDirectory fossilMustBeInstalled if {[isEagle]} then { set directory [::PackageRepository::formatExecArgument \ $scriptDirectory] if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilInfoCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { set directory $scriptDirectory if {[catch { eval exec [subst $fossilInfoCommand] } result]} then { return false } } |
︙ | |||
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if {![file isdir $checkoutDirectory]} then { error [appendArgs \ "checkout directory \"" $checkoutDirectory \ "\" is not really a directory"] } } # # NOTE: This procedure attempts to verify that an implementation of Fossil # is installed locally. There are no arguments. Script errors are # raised if any problems are found. The return value is undefined. # proc fossilMustBeInstalled {} { variable fossilVersionCommand variable fossilVersionPattern if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ $fossilVersionCommand } result] == 0} then { set result [appendArgs $output $error] } else { error "cannot use Fossil: may not be installed and/or configured" } } else { if {[catch { eval exec $fossilVersionCommand } result]} then { error "cannot use Fossil: may not be installed and/or configured" } } if {![info exists result] || \ ![regexp -- $fossilVersionPattern $result]} then { error "cannot use Fossil: unknown or unsupported version" } } # # NOTE: This procedure attempts to verify that the checkout directory does # not contain any (stray) changes. There are no arguments. Non-zero # is returned if the verification is successful. # proc verifyThereAreNoChanges {} { variable checkoutDirectory variable fossilChangesCommand variable fossilChangesPattern fossilMustBeInstalled verifyCheckoutDirectory if {[isEagle]} then { set directory [::PackageRepository::formatExecArgument \ $checkoutDirectory] if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilChangesCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { set directory $checkoutDirectory if {[catch { eval exec [subst $fossilChangesCommand] } result]} then { return false } } |
︙ | |||
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 | 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 | + + + + | # proc verifyThisIsTheCorrectProject {} { variable fossilInfoCommand variable fossilInfoProjectCodePattern variable projectCode variable scriptDirectory fossilMustBeInstalled if {[isEagle]} then { set directory [::PackageRepository::formatExecArgument \ $scriptDirectory] if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilInfoCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { set directory $scriptDirectory if {[catch { eval exec [subst $fossilInfoCommand] } result]} then { return false } } |
︙ | |||
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 | 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 | + + + + | # is returned if the verification is successful. # proc verifyThisIsTheCorrectBranch {} { variable fossilInfoCommand variable fossilInfoTagsPattern variable scriptDirectory fossilMustBeInstalled if {[isEagle]} then { set directory [::PackageRepository::formatExecArgument \ $scriptDirectory] if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilInfoCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { set directory $scriptDirectory if {[catch { eval exec [subst $fossilInfoCommand] } result]} then { return false } } |
︙ | |||
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 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 | + + + + + + + | # directory. There are no arguments. This procedure may raise # script errors. # proc changeToTheCorrectBranch {} { variable checkoutDirectory variable fossilUpdateCommand fossilMustBeInstalled verifyCheckoutDirectory if {[isEagle]} then { set directory [::PackageRepository::formatExecArgument \ $checkoutDirectory] if {[catch { eval exec -success Success [subst $fossilUpdateCommand] } error]} then { error [appendArgs \ "could not change branch: " $error] } } else { set directory $checkoutDirectory if {[catch { eval exec [subst $fossilUpdateCommand] } error]} then { error [appendArgs \ "could not change branch: " $error] } } } # # NOTE: This procedure attempts to stage the specified package file using # Fossil. The targetDirectory argument is the fully qualified path # to the package platform directory. The fileName argument is the # relative name of the file to be staged. This procedure may raise # script errors. # proc stageOnePackageFile { targetDirectory fileName } { variable fossilAddCommand fossilMustBeInstalled if {[isEagle]} then { set directory [::PackageRepository::formatExecArgument \ $targetDirectory] set fileName [::PackageRepository::formatExecArgument $fileName] if {[catch { eval exec -success Success [subst $fossilAddCommand] } error]} then { error [appendArgs \ "could not stage file \"" $fileName "\": " $error] } } else { set directory $targetDirectory if {[catch { eval exec [subst $fossilAddCommand] } error]} then { error [appendArgs \ "could not stage file \"" $fileName "\": " $error] } } |
︙ | |||
884 885 886 887 888 889 890 891 892 893 894 895 896 897 | 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 | + | # # <public> proc commitPackageFiles { package patchLevel language version varName } { variable checkoutDirectory variable fossilCommitCommand variable fossilCommitPattern fossilMustBeInstalled verifyCheckoutDirectory set branch [appendArgs pkg_ $package _ $patchLevel] set comment [appendArgs \ "Add package " $package " v" $patchLevel " for " $language \ " v" $version .] |
︙ | |||
908 909 910 911 912 913 914 915 916 917 918 919 920 921 | 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 | + + | [subst $fossilCommitCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { set directory $checkoutDirectory if {[catch { eval exec [subst $fossilCommitCommand] } result]} then { return false } } |
︙ |
Modified client/1.0/neutral/pkgr_upload.eagle.asc from [f74c472591] to [7dddffeca3].
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/pkgr_upload.eagle.harpy from [5c12ab3ad9] to [346288c4f1].
︙ | |||
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/pkgr_upload.eagle.harpy.asc from [563340f673] to [7a2d5c8aa7].
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 |