Skip to content

Refactor staging step for download strategies.#4424

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
reitermarkus:refactor-download-strategies
Jul 5, 2018
Merged

Refactor staging step for download strategies.#4424
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
reitermarkus:refactor-download-strategies

Conversation

@reitermarkus
Copy link
Copy Markdown
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Refactor the staging step to explicitly include the destination directory in all commands.

Extracted from #4402.

@ghost ghost assigned reitermarkus Jul 5, 2018
@ghost ghost added the in progress Maintainers are working on this label Jul 5, 2018
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out, dramatically easier to review. Looks good 👍

@MikeMcQuaid MikeMcQuaid merged commit 11cbcdc into Homebrew:master Jul 5, 2018
@ghost ghost removed the in progress Maintainers are working on this label Jul 5, 2018
@reitermarkus reitermarkus deleted the refactor-download-strategies branch July 5, 2018 07:28
@ilovezfs
Copy link
Copy Markdown
Contributor

ilovezfs commented Jul 5, 2018

Command output seems to be significantly uglier.
Before

==> Verifying gdb-8.1.tar.xz checksum
tar xJf /Users/joe/Library/Caches/Homebrew/gdb-8.1.tar.xz

After

==> Verifying gdb-8.1.tar.xz checksum
tar -x -J -f /Users/joe/Library/Caches/Homebrew/gdb-8.1.tar.xz -C /private/tmp/gdb-20180705-21040-1vk0rfk

I don't think specifying the output directory should have compromised aesthetics.

Also, it calls attention to the useless -J which doesn't actually flag any errors. You can pass -J to a gz archive or -z to an xz archive and tar will just do whatever it wants anyway. Maybe this isn't true on very old versions of macOS but now we're displaying the useless options with a neon sign.

@reitermarkus
Copy link
Copy Markdown
Member Author

I don't think specifying the output directory should have compromised aesthetics.

I can't change anything about the -C /private/tmp/gdb-20180705-21040-1vk0rfk part,
and xJf vs. -x -J -f is debatable.

@ilovezfs
Copy link
Copy Markdown
Contributor

ilovezfs commented Jul 5, 2018

When all that's actually needed is xf, I think xJf was barely passable, and -x -J -f is just ugly.

@MikeMcQuaid
Copy link
Copy Markdown
Member

When all that's actually needed is xf, I think xJf was barely passable, and -x -J -f is just ugly.

Agreed here. Let's just xf

@MikeMcQuaid
Copy link
Copy Markdown
Member

Agreed here. Let's just xf

Done in #4431

@lock lock bot added the outdated PR was locked due to age label Aug 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants