Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add freebsd snapshot #1674

Merged
merged 3 commits into from Jun 2, 2015

Conversation

Projects
None yet
5 participants
@wca
Copy link
Contributor

wca commented Jun 2, 2015

This branch includes a change to dl-snapshot.py that makes it less directly linked to the format of snapshots.txt, and also adds an initial FreeBSD x86_64 cargo snapshot. The original URL for my snapshot is:

http://people.freebsd.org/~will/public_distfiles/cargo-nightly-x86_64-unknown-freebsd.tar.gz

SHA256: de678e858de5d2923cc206b7aa1cc84ddc67be00748160f66fc9b7325409e7c7

wca added some commits Jun 2, 2015

Make fewer assumptions about snapshots.txt format.
- Read the file into a nested dictionary instead of variables.
- Only apply special cases where they are really needed.
- Apply a transform to the triple argument to get the platform name to
  determine whether there is a snapshot available for it.
- Apply a similar (but slightly different) transform to get the snapshot's
  file name.  It would be better if the file name matched the platform name
  in snapshots.txt, but it's too late for that now (older versions of this
  script will certainly expect the existing name format).
@rust-highfive

This comment has been minimized.

Copy link

rust-highfive commented Jun 2, 2015

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 2, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 2, 2015

⌛️ Testing commit 400c033 with merge 34a52a4...

bors added a commit that referenced this pull request Jun 2, 2015

Auto merge of #1674 - wca:add-freebsd-snapshot, r=alexcrichton
This branch includes a change to dl-snapshot.py that makes it less directly linked to the format of snapshots.txt, and also adds an initial FreeBSD x86_64 cargo snapshot.  The original URL for my snapshot is:

http://people.freebsd.org/~will/public_distfiles/cargo-nightly-x86_64-unknown-freebsd.tar.gz

SHA256: de678e858de5d2923cc206b7aa1cc84ddc67be00748160f66fc9b7325409e7c7
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 2, 2015

@bors bors merged commit 400c033 into rust-lang:master Jun 2, 2015

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
homu Test successful
Details

@wca wca deleted the wca:add-freebsd-snapshot branch Jun 2, 2015

# no need to look past the first section.
break

date = snaps.keys()[0]

This comment has been minimized.

@chris-morgan

chris-morgan Jun 3, 2015

Member

This has blown up Python 3 support, because keys() returns a set-like object rather than a list as it did in Python 2. next(iter(snaps.keys())) is the correct approach—or (my preference) just use current directly.

@wca wca referenced this pull request Jun 3, 2015

Closed

Restore python3 support. #1677

chris-morgan added a commit to chris-morgan/cargo that referenced this pull request Jun 3, 2015

Fix snapshot downloading on Python 3
This regression, introduced in d3f590f
in rust-lang#1674, caused `make` to fail on machines where `python` is Python 3
rather than Python 2, because `dict.keys()` returns a set-like object
that does not support indexing rather than a list.

`date = next(iter(snaps.keys()))` would be an adequate fix too, but I’m
not particularly happy with either of them, for neither would stand up
to the removal of the `break` statement: one is inadequate because
dictionaries are unordered collections, the other is inadequate because
`current` would refer to the *last* rather than the *first* snapshot in
the file.

bors added a commit that referenced this pull request Jun 3, 2015

Auto merge of #1678 - chris-morgan:master, r=alexcrichton
This regression, introduced in d3f590f in #1674, caused `make` to fail on machines where `python` is Python 3 rather than Python 2, because `dict.keys()` returns a set-like object that does not support indexing rather than a list.

`date = next(iter(snaps.keys()))` would be an adequate fix too, but I’m not particularly happy with either of them, for neither would stand up to the removal of the `break` statement: one is inadequate because dictionaries are unordered collections, the other is inadequate because `current` would refer to the *last* rather than the *first* snapshot in the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.