Skip to content

Switch from the r option on ar to q #569

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

Merged
merged 1 commit into from
Nov 20, 2020
Merged

Switch from the r option on ar to q #569

merged 1 commit into from
Nov 20, 2020

Conversation

alexcrichton
Copy link
Member

The r option means "add the object while replacing it if it already
exists", while the q option says "always add to the end". We actually
want the latter of these due to how this crate works because we're
always building archives from scratch, and we always want all our
objects to go in the archive instead of trying to replace previous
versions.

This should fix a recent issue with #564 where previously if everything
was in one giant command line ar would append two files but now
afterwards with multiple invocations the second invocation may overwrite
files added in the first invocation.

Closes #568

The `r` option means "add the object while replacing it if it already
exists", while the `q` option says "always add to the end". We actually
want the latter of these due to how this crate works because we're
always building archives from scratch, and we always want all our
objects to go in the archive instead of trying to replace previous
versions.

This should fix a recent issue with #564 where previously if everything
was in one giant command line `ar` would append two files but now
afterwards with multiple invocations the second invocation may overwrite
files added in the first invocation.

Closes #568
@alexcrichton alexcrichton merged commit 2fe3a41 into master Nov 20, 2020
@alexcrichton alexcrichton deleted the add-to-end branch November 20, 2020 16:13
alexcrichton added a commit that referenced this pull request Nov 20, 2020
This commit splits out the `s` command from the `ar` invocation to
happen as part of a separate step after the archive is fully assembled.
Turns out #569 has an issue on Linux where `qs` implies `r` (??), so to
get the append-only behavior of `q` we need to omit the `s`.

Closes #568 (for real this time?)
alexcrichton added a commit that referenced this pull request Nov 20, 2020
This commit splits out the `s` command from the `ar` invocation to
happen as part of a separate step after the archive is fully assembled.
Turns out #569 has an issue on Linux where `qs` implies `r` (??), so to
get the append-only behavior of `q` we need to omit the `s`.

Closes #568 (for real this time?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Is 1.0.63 (progressive linking?) a breaking change?
1 participant