Overview
Comment: | More work on the staging and commit phases of the package uploader client. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
682f275075866f41f9f1819bee310849 |
User & Date: | mistachkin on 2016-12-19 19:28:48 |
Other Links: | manifest | tags |
Context
2016-12-19
| ||
19:31 | Remove superfluous line. check-in: 4465f70e83 user: mistachkin tags: trunk | |
19:28 | More work on the staging and commit phases of the package uploader client. check-in: 682f275075 user: mistachkin tags: trunk | |
03:57 | Get metadata submission working for the package uploader client. check-in: e45fd33145 user: mistachkin tags: trunk | |
Changes
Modified client/1.0/neutral/pkgr_upload.eagle from [d5bee856dc] to [ce49a5edf0].
︙ | ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 | # # NOTE: This procedure sets up the default values for all configuration # parameters used by the package uploader client. The script # argument is the fully qualified path and file name for the script # being evaluated. # proc setupUploadVars { script } { # # NOTE: What is the fully qualified path to the directory containing the # checkout for the package client? # | > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | > | 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 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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | # # NOTE: This procedure sets up the default values for all configuration # parameters used by the package uploader client. The script # argument is the fully qualified path and file name for the script # being evaluated. # proc setupUploadVars { script } { # # NOTE: The project code for the Fossil repository. This will be checked # prior to staging or committing any files. # variable projectCode; # DEFAULT: 9ceada8dbb8678898e5b2c05386e73b3ff2c2dec if {![info exists projectCode]} then { set projectCode 9ceada8dbb8678898e5b2c05386e73b3ff2c2dec } # # NOTE: What is the fully qualified path to the directory containing the # checkout for the package client? # variable checkoutDirectory; # DEFAULT: <scriptDir> if {![info exists checkoutDirectory]} then { set checkoutDirectory [file dirname $script] } # # NOTE: The command to use when attempting to check for changes prior to # staging files using Fossil. # variable fossilChangesCommand; # DEFAULT fossil changes ... if {![info exists fossilChangesCommand]} then { set fossilChangesCommand {fossil changes --chdir {${checkoutDirectory}}} } # # NOTE: The regular expression pattern used when attempting to verify # that the Fossil checkout has no changes staged. Generally, this # pattern should only match an empty string. # variable fossilChangesPattern; # DEFAULT: {^$} if {![info exists fossilChangesPattern]} then { set fossilChangesPattern {^$} } # # NOTE: The command to use when attempting to check the checkout status # prior to staging files using Fossil. # variable fossilInfoCommand; # DEFAULT fossil info ... if {![info exists fossilInfoCommand]} then { set fossilInfoCommand {fossil info --chdir {${checkoutDirectory}}} } # # NOTE: The regular expression pattern used when attempting to verify # that the Fossil checkout belongs to the correct project. # variable fossilInfoProjectCodePattern; # DEFAULT: {^project-code:\\s+...\$} if {![info exists fossilInfoProjectCodePattern]} then { set fossilInfoProjectCodePattern [appendArgs \ {^project-code:\\s+${projectCode}\$}] } # # NOTE: The regular expression pattern used when attempting to verify # that the Fossil checkout is sitting on the correct branch. # variable fossilInfoTagsPattern; # DEFAULT: {^tags:\s+trunk(?:,|$)} if {![info exists fossilInfoTagsPattern]} then { 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. # variable fossilUpdateCommand; # DEFAULT fossil update trunk ... if {![info exists fossilUpdateCommand]} then { set fossilUpdateCommand \ {fossil update trunk --chdir {${checkoutDirectory}}} } # # NOTE: The command to use when attempting to stage package files using # Fossil. # variable fossilAddCommand; # DEFAULT fossil add ... if {![info exists fossilAddCommand]} then { set fossilAddCommand \ {fossil add --chdir {${checkoutDirectory}} {${fileName}}} } # # NOTE: The command to use when attempting to commit package files using # Fossil. # variable fossilCommitCommand; # DEFAULT fossil commit ... |
︙ | ︙ | |||
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | return [eval ::PackageRepository::getFileViaHttp \ [list $uri] [list 20] [list stdout] [list \ [expr {!$verboseMetadataSubmit}]] $options] } } # # NOTE: This procedure attempts to stage the specified package files using # Fossil. The fileNames argument is a list of (fully?) qualified # local file names to stage. # # <public> proc stagePackageFiles { language version platform fileNames } { variable checkoutDirectory variable fossilAddCommand set relativeFileNames [getRelativeFileNames $fileNames] | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < > | | > > | < < | < < | < < | > | | > > | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 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 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 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 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 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | return [eval ::PackageRepository::getFileViaHttp \ [list $uri] [list 20] [list stdout] [list \ [expr {!$verboseMetadataSubmit}]] $options] } } # # 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 if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilChangesCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { if {[catch { eval exec [subst $fossilChangesCommand] } result]} then { return false } } if {![info exists result] || \ ![regexp -- $fossilChangesPattern $result]} then { return false } return true } # # NOTE: This procedure attempts to verify that the checkout directory does # belong to the correct project. There are no arguments. Non-zero # is returned if the verification is successful. # proc verifyThisIsTheCorrectProject {} { variable checkoutDirectory variable fossilInfoCommand variable fossilInfoProjectCodePattern variable projectCode if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilInfoCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { if {[catch { eval exec [subst $fossilInfoCommand] } result]} then { return false } } if {![info exists result] || ![regexp -line -- \ [subst $fossilInfoProjectCodePattern] $result]} then { return false } return true } # # NOTE: This procedure attempts to verify that the checkout directory does # belong to the correct branch. There are no arguments. Non-zero # is returned if the verification is successful. # proc verifyThisIsTheCorrectBranch {} { variable checkoutDirectory variable fossilInfoCommand variable fossilInfoTagsPattern if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilInfoCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { if {[catch { eval exec [subst $fossilInfoCommand] } result]} then { return false } } if {![info exists result] || \ ![regexp -line -- $fossilInfoTagsPattern $result]} then { return false } return true } # # NOTE: This procedure attempts to change the branch for the checkout # directory. There are no arguments. This procedure may raise # script errors. # proc changeToTheCorrectBranch {} { variable checkoutDirectory variable fossilUpdateCommand if {[isEagle]} then { if {[catch { eval exec -success Success [subst $fossilUpdateCommand] } error]} then { error [appendArgs \ "could not change branch: " $error] } } else { if {[catch { eval exec [subst $fossilUpdateCommand] } error]} then { error [appendArgs \ "could not change branch: " $error] } } } # # NOTE: This procedure attempts to stage the specified package files using # Fossil. The fileNames argument is a list of (fully?) qualified # local file names to stage. # # <public> proc stagePackageFiles { language version platform fileNames } { variable checkoutDirectory variable fossilAddCommand variable fossilUpdateCommand if {![verifyThereAreNoChanges]} then { error "cannot stage package files: there are pending changes" } if {![verifyThisIsTheCorrectProject]} then { error "cannot stage package files: wrong project" } if {![verifyThisIsTheCorrectBranch]} then { changeToTheCorrectBranch if {![verifyThisIsTheCorrectBranch]} then { error "cannot stage file: still on wrong branch" } } set relativeFileNames [getRelativeFileNames $fileNames] foreach fileName $fileNames relativeFileName $relativeFileNames { file mkdir [file join \ $checkoutDirectory $language $version $platform \ [file dirname $relativeFileName]] file copy $fileName \ [file join $checkoutDirectory $relativeFileName] set fileName $relativeFileName; # NOTE: For [subst]. if {[isEagle]} then { set fileName [::PackageRepository::formatExecArgument $fileName] if {[catch { eval exec -success Success [subst $fossilAddCommand] } error]} then { error [appendArgs \ "could not stage file \"" $fileName "\": " $error] } } else { if {[catch { eval exec [subst $fossilAddCommand] } error]} then { error [appendArgs \ "could not stage file \"" $fileName "\": " $error] } } } } # # NOTE: This procedure attempts to commit the staged package files to the # remote package file repository using Fossil. The varName argument # is the name of a scalar variable in the context of the immediate # caller that will receive the resulting Fossil check-in identifier. # # <public> proc commitPackageFiles { package patchLevel language version varName } { variable checkoutDirectory variable fossilCommitCommand variable fossilCommitPattern set branch [appendArgs pkg_ $package _ $patchLevel] set comment [appendArgs \ "Add package " $package " v" $patchLevel " for " $language \ " v" $version .] if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilCommitCommand] } result] == 0} then { set result [appendArgs $output $error] |
︙ | ︙ |
Modified client/1.0/neutral/pkgr_upload.eagle.asc from [0964d32505] to [85db33e229].
1 2 3 4 | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository | | | | | | | | | | | | | | | 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 iQIcBAABCAAGBQJYWDTSAAoJEFAslq9JXcLZZZsP/1nDc+BYiIBYkTkDmhWyJjuG VqPuvtIxWYzkOw6mLY3ndLy9XpS43ByK2U/1Rmc9J3EibgflpAhAc5CL+528ML9g OCYkvnT912sWzYROHPai0fOmKigvSJEb2tf4aAxcHVg2JojmXzY0sxkEtMt5kayX Gl2ssWxwJ75fSVVk5Kv3DOtdj0MeGM4aH+83u7OvCUDWpjEh0YexzbaZ/4Jkys4P WxeXUkli9OR4HMdHHnwxdx0qCVxodlHuTw33ETvXpAPiLOHVmKSrYL2Rz1erXuLa BsGJoGbfoTPblnDwMciTYFnRxvUhWqL0gIxsTGMsMkfeHxT5ka5sDqGDJ7cbEIcw OlZt/2vBmOYbAwvTxejbecsOL9lTpOgRn6F1ih8ADvPNwuWgw+i1RXJIsjcGnRp2 nHB79cQikEypTl8k6ibbOOFwDx4Oml77a2xj3jFVxM7E8OyNVcckujnPto5NmOzv 6jvq5+P2yd5Zf/T8fIRrjg49Cs3r+dFIBHi6gtUODcxB6BbIJFEWCVbQ+n7jRKbs 6i3SXTqQE1p+sWzrzWOnB7k/U4vn5iAEyjhgzgPqLjXqNrVTBz/lVOFkm7sJmMR1 eCJv2Th5s6/GKTC8xZUEI4+WchAntYYSadY0KORMA6RTqiUekTuh+Al7br2LgkLH MuRP2BppI0sbQ0CghjJF =jK3P -----END PGP SIGNATURE----- |
Modified client/1.0/neutral/pkgr_upload.eagle.harpy from [9a4cc16d5a] to [be05086283].
︙ | ︙ | |||
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 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> <Id>016ba0e0-7a00-4f14-bf99-3621f235dc43</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-12-19T19:27:50.3632812Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x9559f6017247e3e2</Key> <Signature> vBWXY1wBTmx2MwNjfVuFBOMnUWcb694qsLuetgXPJvQKXKHdWRFtfhXG32XfwXdr2FIUeGgBMinS OHPswvyhmt7HCs440VFmP2bqz21YRlzczUdLr1FzQVIfgoshqzfrPgFQEeikmTpbTk2MEQ32aX2z nw/fkHIJl6YpFUUhwRQM5hRtM0rxIt2zhhlNyFZkt8msVtaq+Hk/VmRf+R++6LjxsM2RBqxqQm05 fHXhI2neKs9t0/AH8Ib645gTlGvEWmh/dWGwsivwT//wqyGEhsfTsU7In0Pqz+aNq8w87VVtK12A GwtKAndpqm2EmkP6bZ5fdl73Ytla83atmpfiv5b3k8zGZvIMQ9/+N180zc2TJNl5GdLaxNAO74xa 5pE633tTA0Ge9qXifMVZK7Ug7lgr/3QQT/nYCHGw8Qx7poeE9bSBzuwKp5a89sZbPXLHKvQ4y+Dd yYQsgGWKxGt+0nbH3xSSGrO1XWmKiFS1kLTe8XDXNAR+B6WSiTOa3v0ssxLK2he1nGzuqeh6NCVd 4fNkoio7t+CuJjRAe543+FqhWdVKdMVydduV5Y4nuqCPra7KUHQ0unFk60Uo05TpBGDWYtBKeLYa JjIGHf8ck3c9ZdnPgCLNXXGnxjiFbH2vaCHx20An1U/Fx74+tLTAVJ1qbQ2XLipn2CCw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l+H2 PQErd1ki/ZTD57kgSgJkAWX0PqnysURIgxb4STAHtwkGOBWHQQKtXtcGcNtM5GqSN6YO/zTSjPil ttCHiqwYKsyPCyTOAugSB+2RfXH90+FTMKEIECQbZ7tLn7hzN4QA90ckzh0MpXcYbhFPwfbMJWN1 cZjfRcLN+W3p1WuqCF9ao0cO1KNAndVHhX0vZfk/VN5Ajfec/V4MfF+fwZo9tHSSpZiOVvhuXQyA 5IFwy0JZol6HFR1yj5+cTtMb71b/LRKU9c8AMem74Ad3ovKbd+zVuoy7PVT9Hfqvl/LMRkWi0Xzx 7iVmDuEfZ2X9rcGs0WVvT0XnQaukWRyK4I8EqK9JGHhiRD0Q5yE7TrMKey9Jf9wteb7eyhY7jZx7 4Y7GnLZLHK5vz88+7TvDUBnYX2xLD3Ula28+quHvek5/m4E610wPyrda8u8p1igPtvf0fRkNJm1J k9TtX7O0luEZWKHnsWsZfAdiwzea46SxlfG9Pa8psdaQ6tK4uufioSQ17muSwVie3TJYRakBXDfG oL7tMR3KwBwqvNd2cVy4H3WI72EYHgb0KQOsC22lZmCy69BbUnFeMW/SiyR4xJveCQID39Urdwjm diaZ312Gu56CgrLT9N7f4oK83vI0BcMoi5oeRycX7ltOQa+RKxZmAnrPPG0rYQwcqZAVd/nrr5xC SonzzcUx27YwUbukyC9vgy8vZ+BmtK6f1aIhIad3XT9UWmAi3WgHmE2RKyXnLtKeQTRFlpOTRw7q ZB/PjUtUMmTWhR2UH94VK0bpblA1sIK7aG600/Sij712PEbw6A89oylIC1MtDUZ51EedIOjpSsEC JtRYk69ERVunZbtM4kF6QezTmlspEuawdz+P+TRBAbMuI+D5EO2s/C3JFAvvbScZuvlJDIYTNFf2 FCPtgeqjMspS+NHxij399gLNdmHPOBuzwVeLnnfyVAkFHhntrBNGUQ3XLf2q93BdRxDSsU4= </Signature> </Certificate> |
Modified client/1.0/neutral/pkgr_upload.eagle.harpy.asc from [19412242bb] to [69610e8531].
1 2 3 4 | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository | | | | | | | | | | | | | | | 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 iQIcBAABCAAGBQJYWDTTAAoJEFAslq9JXcLZbcwP/0FKdoE5f5LG2ucL4ZnW8vH9 qi1UwJgUnkvHy82ILxuJ9Tr4Oj3WWELvvcv6P8ujMSE9zzK69NhXiy8LJfL8FVc0 q+X79V1Dw51g3LGXQ+V/hYpegWKoVZ2qpXK2K1BfCo3ymjDuEoxE/YinGfdJGbTr ShfZtAL9UtuoD89Z9aGxD2Pt9Rtao31BxwTh3/m+UFEkS8KosmZ9eG7QmVM9ZtlL Y2uXiVYQOd9lz0mG59SMItDJsgK1QY1+km2o5NBnQDN9wA0UF0kQE6coyyGlORwq lWTTvCRnsl9jjmQ52+2QuctOuVrQ7MZ4bQ44elCYyB31yFUyeX+O7fM+aAXWq3L8 uvNHAsd/5UOflSqQEUFroZt7OGpXpl9go22vG4OxEWZxA6Q/GoHwGFBL68DLvCWG wEyKIOOTtFOAv4vK+su44f3AFBabBcufgd1qCTrHVq0pGze+P/c+1EGY60J/0gUP 5TSDXYYeDX2kQIpf7aAhSQ64YYxtOBQoVY9u0YeqhqbUuacddYdG2m4Q+EygmRBY t0FYFOnODTU7M80/8PGMoZhYB33EtkxG0WaIPagPTpCpm1zstljIE1DGW6A/zmF6 ChU3LVAE1HexG8JHz++d2HWLhH+8x0ZbvqLf/g39YU/W8FYR6CZ02N4+zXSnhWTe +/X4aHGlI93NwC0qSJAZ =K/EX -----END PGP SIGNATURE----- |