Skip to content

rustbuild: Use current_dir instead of -C #36456

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 29, 2016

Conversation

alexcrichton
Copy link
Member

Apparently some versions of git don't support the -C flag, so let's use the
guaranteed-to-work current_dir function.

@rust-highfive
Copy link
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@sophiajt
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 13, 2016

📌 Commit 6b2cf78 has been approved by jonathandturner

@bors
Copy link
Collaborator

bors commented Sep 14, 2016

⌛ Testing commit 6b2cf78 with merge 20abf70...

@bors
Copy link
Collaborator

bors commented Sep 14, 2016

💔 Test failed - auto-linux-64-cross-freebsd

@alexcrichton
Copy link
Member Author

@bors: retry

On Tue, Sep 13, 2016 at 7:51 PM, bors notifications@github.com wrote:

💔 Test failed - auto-linux-64-cross-freebsd
https://buildbot.rust-lang.org/builders/auto-linux-64-cross-freebsd/builds/1629


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36456 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95OuOj0eN6XNgCCGnvOEQoO_38Op5ks5qp2EYgaJpZM4J8Dh5
.

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 15, 2016
…r=jonathandturner

rustbuild: Use current_dir instead of -C

Apparently some versions of git don't support the `-C` flag, so let's use the
guaranteed-to-work `current_dir` function.
@bors
Copy link
Collaborator

bors commented Sep 17, 2016

⌛ Testing commit 6b2cf78 with merge 0f7fe2f...

@bors
Copy link
Collaborator

bors commented Sep 17, 2016

💔 Test failed - auto-linux-64-cross-freebsd

@sophiajt
Copy link
Contributor

Pinging @alexcrichton - do we still need this? If so, do you know what fix this needs?

Apparently some versions of git don't support the `-C` flag, so let's use the
guaranteed-to-work `current_dir` function.
@alexcrichton
Copy link
Member Author

@bors: r=jonathandturner

Let's see if that works

@bors
Copy link
Collaborator

bors commented Sep 28, 2016

📌 Commit d68f7eb has been approved by jonathandturner

@bors
Copy link
Collaborator

bors commented Sep 29, 2016

⌛ Testing commit d68f7eb with merge 704bcc0...

bors added a commit that referenced this pull request Sep 29, 2016
…turner

rustbuild: Use current_dir instead of -C

Apparently some versions of git don't support the `-C` flag, so let's use the
guaranteed-to-work `current_dir` function.
@bors bors merged commit d68f7eb into rust-lang:master Sep 29, 2016
@bors bors mentioned this pull request Sep 29, 2016
@TimNN
Copy link
Contributor

TimNN commented Sep 29, 2016

This (I think) broke using rustbuild from a different directory for me :(

I'm getting

logic@sys:~/build/rust-out/dev-build$ python ../../rust/src/bootstrap/bootstrap.py --step check-rpass --stage 1
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
Synchronizing submodule url for 'src/compiler-rt'
Synchronizing submodule url for 'src/jemalloc'
Synchronizing submodule url for 'src/liblibc'
Synchronizing submodule url for 'src/llvm'
Synchronizing submodule url for 'src/rt/hoedown'
Synchronizing submodule url for 'src/rust-installer'
fatal: Not a git repository (or any of the parent directories): .git


command did not execute successfully: "git" "reset" "--hard"
expected success, got: exit code: 128


logic@sys:~/build/rust-out/dev-build$

Edit: Reverting d68f7eb did indeed fix the problem

@alexcrichton alexcrichton deleted the rustbuild-dont-use-c branch September 29, 2016 21:01
@alexcrichton
Copy link
Member Author

@TimNN oh dear! could you describe the directory layout here? Also maybe run with -v to see what's getting run?

@TimNN
Copy link
Contributor

TimNN commented Sep 29, 2016

Looking at the patch, this probably needs to join self.src before the submodule.path.

The layout is basically something like

+ home
|--- rust-src <-- checkout
|--- rust-build <-- build directory

Edit: -v did not help, it's just printing running: "git" "reset" "--hard"

@alexcrichton
Copy link
Member Author

Ah right, sounds good to me! (adding self.src.join(..)). Want to send a PR?

@TimNN
Copy link
Contributor

TimNN commented Sep 29, 2016

Yeah, I can send a PR. However that will have to wait until tomorrow (it's getting late here) so if anyone wants to send one before then, feel free.

@alexcrichton
Copy link
Member Author

Awesome, thanks!

bors added a commit that referenced this pull request Oct 2, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants