Merge lp://staging/~gary/zc.buildout/betafix6 into lp://staging/zc.buildout

Proposed by Gary Poster
Status: Needs review
Proposed branch: lp://staging/~gary/zc.buildout/betafix6
Merge into: lp://staging/zc.buildout
Prerequisite: lp://staging/~gary/zc.buildout/betafix5
Diff against target: 979 lines (+465/-123)
7 files modified
CHANGES.txt (+37/-4)
src/zc/buildout/bootstrap.txt (+103/-24)
src/zc/buildout/buildout.py (+60/-55)
src/zc/buildout/buildout.txt (+24/-12)
src/zc/buildout/easy_install.py (+20/-15)
src/zc/buildout/tests.py (+183/-11)
src/zc/buildout/update.txt (+38/-2)
To merge this branch: bzr merge lp://staging/~gary/zc.buildout/betafix6
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) code Approve
Review via email: mp+31996@code.staging.launchpad.net

Description of the change

By default, Buildout and the bootstrap script now prefer final versions of Buildout, recipes, and extensions. This was done to try and prevent problems such as those that happened the last time I tried to make a zc.buildout release. See the CHANGES file updates (which also include some notes I should have included in an earlier revision) for how it works; also not that betafix7 has a help document for users, so if you think the mechanism is fine but you want the users to have some better docs, please look at that branch. The logic for figuring out final versions in bootstrap was ripped from easy_install. The bootstrap test had to do some new tricks to exercise the changes. These new tricks revealed that, once the new version of zc.buildout was released, the bootstrap test would have failed. I believe this is now fixed as a side effect of the main effort.

I factored out some bool parsing behavior into a method on the Options object, because I was adding yet another bool and wanted to not copy and paste the code again. Note that I change the behavior of get_bool in betafix7, so it might be better to comment on its approach on that branch.

To post a comment you must log in.
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Hi Gary,

I don't understand the need for both an option to bootstrap and one for
buildout. What happen if we only use the bootstrap.py option?

Is it that buildout/setuptools will upgrade itself whenever the buildout is
used? Or only the recipes? I think some clarifications of why one would use
the various options is needed to make this clearer.

Otherwise, everything looks good.

review: Needs Information (code)
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

OK, after discussion on IRC it does seem that this limitation is what is best acceptable trade-off. There is already duplication of options already (download-cache, eggs) etc.

If it's easy to detect that buildout would be downgraded (boostrap used --accept, but the option is missing in buildout), then I'd suggest adding an error asking the user to either rerun bootstrap without the option or change the buildout.cfg variable.

Otherwise (or in addition) change the documentation of the option to make it clear that one should set the buildout.cfg option when using the bootstrap option otherwise things will get confused.

review: Approve (code)
564. By Gary Poster

clarify that --accept-early-release must be accompanied with prefer-final-build-system= false.

Revision history for this message
Gary Poster (gary) wrote :

Hey Francis. What do you think of this approach to addressing your concerns?

http://pastebin.ubuntu.com/479699/

Essentially, you only have to use --accept-early-release when calling the bootstrap. This flag is remembered thanks to code scribbled in the buildout script. When you rerun bootstrap without that argument it goes back to the usual behavior.

This is much nicer usability, at the expense of a somewhat odd pattern; however, I think it is defensible since what we are trying to control extends from bootstrapping through normal use.

If you think this is reasonable, I'll need to update CHANGES and make sure the rest of the tests still pass.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

I like that!

Revision history for this message
Gary Poster (gary) wrote :

Cool. The patch got on the big side (526 lines) so I made it into another branch based on betafix7: https://code.edge.launchpad.net/~gary/zc.buildout/betafix8/+merge/33077 .

Unmerged revisions

564. By Gary Poster

clarify that --accept-early-release must be accompanied with prefer-final-build-system= false.

563. By Gary Poster

merge from trunk/previous branches

562. By Gary Poster

By default, Buildout and the bootstrap script now prefer final versions of Buildout, recipes, and extensions.

561. By Gary Poster

get tests passing for Python 2.7. Also includes Lennart Regebro changes to use the standard library doctest.

560. By Gary Poster

small Python 2.6 bugfix and Distribute test clean-ups

559. By Gary Poster

fix tests for changes

558. By Gary Poster

mimic standard site.py behavior for inclusion of .pth files

557. By Gary Poster

eliminate spurious warning if you are using distribute.

556. By Gary Poster

add files so releases can be made from a non-SVN checkout

555. By Gary Poster

fix virtualenv interaction by identfying broken virtualenv characteristic and reverting to previous behavior in that case.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: