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

homebrew: accept keg-only packages as installed #799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/rosdep2/platforms/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ def is_installed(r):
pkg_info = pkg_info[0]
linked_version = pkg_info['linked_keg']
if not linked_version:
return False
keg_only = pkg_info['keg_only']
if keg_only:
return True
Copy link

Choose a reason for hiding this comment

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

I think this code will return True for any keg-only formula, even if it's not actually installed. Do you want to use the installed field instead?

note that the caveats field in the json does not match the full output printed by brew info. I believe running brew ruby -e 'require "caveats"; puts Caveats.new("qt@5".f).keg_only_text' can generate the full caveats string

else:
return False
for spec in pkg_info['installed']:
if spec['version'] == linked_version:
installed_options = spec['used_options']
Expand Down