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

Vendored Ruby tweaks #494

Merged
merged 3 commits into from
Jul 12, 2016
Merged

Vendored Ruby tweaks #494

merged 3 commits into from
Jul 12, 2016

Conversation

MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Jul 11, 2016

  • 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 tests with your changes locally?

  • fix original setup ruby path name.
  • allow forcing the usage of the vendored Ruby.
  • brew.sh: only setup/install Ruby when running Ruby.

CC @xu-cheng

@BrewTestBot BrewTestBot added the in progress Maintainers are working on this label Jul 11, 2016
@MikeMcQuaid
Copy link
Member Author

Revealed this on first install:

mikebook # HOMEBREW_FORCE_VENDOR_RUBY=1 brew info                          (master) [/usr/local]
git: The build tool has reset ENV; --env=std required.
git: The build tool has reset ENV; --env=std required.
66 kegs, 44,693 files, 1.4G

# shellcheck source=/dev/null
source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh"
setup-ruby-path
fi
Copy link
Member Author

Choose a reason for hiding this comment

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

@xu-cheng Without this if there's a bug in vendor-install we cannot get people to brew update to fix it.

Copy link
Member

@xu-cheng xu-cheng Jul 11, 2016

Choose a reason for hiding this comment

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

This is incorrect because ENV/scm/git which is used by update requiring Ruby path set.

Copy link
Member

Choose a reason for hiding this comment

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

The long term solution is to rewrite scm script in bash.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or we can avoid using ENV/scm/git in update again (which feels like a better solution for now)

Copy link
Member Author

Choose a reason for hiding this comment

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

As we want to avoid calling any Ruby code until we get to update-report (which should call vendor-install).

Copy link
Member

Choose a reason for hiding this comment

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

Would you mind to wait for a moment? As I think porting to bash is not too difficult and much better solution.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok. Any idea how long?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@xu-cheng 👏

Copy link
Member

Choose a reason for hiding this comment

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

I think you can inline this block into below if [[ -n "$HOMEBREW_BASH_COMMAND" ]] ... instead of adding an extra condition check.

@MikeMcQuaid
Copy link
Member Author

@xu-cheng Are you 👍 on this now?

@xu-cheng
Copy link
Member

One comment. Otherwise 👍

@MikeMcQuaid MikeMcQuaid merged commit 873aa67 into Homebrew:master Jul 12, 2016
@MikeMcQuaid MikeMcQuaid deleted the vendor-ruby-tweaks branch July 12, 2016 08:13
@BrewTestBot BrewTestBot removed the in progress Maintainers are working on this label Jul 12, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants