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

vendor: Update ruby-macho to 0.2.6. #1469

Merged
merged 3 commits into from
Nov 10, 2016

Conversation

woodruffw
Copy link
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 tests with your changes locally?

This brings fixes for behavior expected in #1460.

cc @MikeMcQuaid, @UniqMartin

@MikeMcQuaid
Copy link
Member

As #1460 was reverted could you add its changes to this PR too? Thanks!

@woodruffw woodruffw force-pushed the ruby-macho-revendor branch 2 times, most recently from 48bb65f to df8176f Compare November 9, 2016 22:35
This brings fixes for behavior expected in Homebrew#1460.
…lib type.

This allows us to filter out weak linkages during audits, preventing
a false error from occurring when the dylib cannot be found.
Prevents namespace conflict with vendored ruby-macho.
@MikeMcQuaid MikeMcQuaid merged commit 42aa098 into Homebrew:master Nov 10, 2016
@MikeMcQuaid
Copy link
Member

Thanks again @woodruffw!

def dynamically_linked_libraries(except: :none)
lcs = macho.dylib_load_commands.reject { |lc| lc.type == except }

lcs.map(&:name).map(&:to_s)
Copy link
Member

Choose a reason for hiding this comment

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

lcs.map(&:name).map(&:to_s) should be lcs.map(&:name).map(&:to_s).uniq otherwise universal libraries show up twice. This then triggers a failure to bottle universal binaries & libraries, like my wine PR (Homebrew/homebrew-core#10532 ; test results: https://bot.brew.sh/job/Homebrew%20Core/17442/version=sierra/testReport/junit/brew-test-bot/sierra/bottle_wine/)

Before the commit, this code relied on macho.linked_dylibs, which does apply uniq:

    def linked_dylibs
      # Individual architectures in a fat binary can link to different subsets
      # of libraries, but at this point we want to have the full picture, i.e.
      # the union of all libraries used by all architectures.
      machos.map(&:linked_dylibs).flatten.uniq
    end

@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
@woodruffw woodruffw deleted the ruby-macho-revendor branch July 3, 2018 16:08
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