Travis CI Linux builds failing for a PR


For the past several days I’ve been working on a PR to reintegrate hyper into rustup, and for the last two build attempts I’m getting a strange failure for all Linux builds. The build image first successfully fetches, builds and installs OpenSSL, then fails at the beginning of cargo build:

+ cargo build --release --target i686-unknown-linux-gnu
    Updating registry ``
    Updating git repository ``
    Updating git repository ``
    Updating git repository ``
    Updating git repository ``
error: failed to write /buildslave/Cargo.lock

Caused by:
  failed to open: /buildslave/Cargo.lock

To learn more, run the command again with --verbose.

Full logs for reference.


Oh, gah. I retried the build and lost the logs you were linking. Maybe trying to add the suggested --verbose flag would help. cc @alexcrichton.


Update: my mistake, @alexcrichton correctly diagnosed it as a not-up-to-date Cargo.lock in the commit which caused the build script to attempt modifying it and failing (it’s read-only during the build.)

Therefore, a cargo build followed by git status are in order before pushing any commit to a PR.