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

"brew search --desc" fails #22

Closed
BlindGuyNW opened this issue Apr 3, 2016 · 9 comments
Closed

"brew search --desc" fails #22

BlindGuyNW opened this issue Apr 3, 2016 · 9 comments
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@BlindGuyNW
Copy link

Description

brew search --desc foobar fails with "Error: undefined local variable or method `cache_mtime' for Descriptions:Class."

Stack trace

/usr/local/Library/Homebrew/descriptions.rb:44:in `block in cache_fresh?'
/usr/local/Library/Homebrew/tap.rb:427:in `block (2 levels) in each'
/usr/local/Library/Homebrew/tap.rb:426:in `each'
/usr/local/Library/Homebrew/tap.rb:426:in `block in each'
/usr/local/Library/Homebrew/tap.rb:425:in `each'
/usr/local/Library/Homebrew/tap.rb:425:in `each'
/usr/local/Library/Homebrew/descriptions.rb:41:in `cache_fresh?'
/usr/local/Library/Homebrew/descriptions.rb:52:in `ensure_cache'
/usr/local/Library/Homebrew/descriptions.rb:100:in `search'
/usr/local/Library/Homebrew/cmd/search.rb:29:in `search'
/usr/local/Library/brew.rb:84:in `<main>'
@bfontaine
Copy link
Contributor

I can’t reproduce. Please run brew update and try again.

@BlindGuyNW
Copy link
Author

Done, and same result.

I wanted to say that it worked once before consistently failing with this error.

On Apr 3, 2016, at 12:38 PM, Baptiste Fontaine notifications@github.com wrote:

I can’t reproduce. Please run brew update and try again.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #22 (comment)

@bfontaine
Copy link
Contributor

Please post the output of brew doctor and brew config.

@BlindGuyNW
Copy link
Author

brew doctor, twice for good measure:
Your system is ready to brew.

Brew config:
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: fbc5fc3
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 5027af7
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
OS X: 10.11.4-x86_64
Xcode: 7.3
CLT: 7.3.0.0.1.1457485338
Clang: 7.3 build 703
X11: 2.7.8 => /opt/X11
System Ruby: 2.0.0-p648
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_73, 1.6.0_65-b14-468

On Apr 3, 2016, at 12:44 PM, Baptiste Fontaine notifications@github.com wrote:

Please post the output of brew doctor and brew config.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #22 (comment)

@apjanke
Copy link
Contributor

apjanke commented Apr 3, 2016

Reproduces for me on OS X 10.9.5.

$ brew search --desc foobar
Error: undefined local variable or method `cache_mtime' for Descriptions:Class
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/descriptions.rb:44:in `block in cache_fresh?'
/usr/local/Library/Homebrew/tap.rb:427:in `block (2 levels) in each'
/usr/local/Library/Homebrew/tap.rb:426:in `each'
/usr/local/Library/Homebrew/tap.rb:426:in `block in each'
/usr/local/Library/Homebrew/tap.rb:425:in `each'
/usr/local/Library/Homebrew/tap.rb:425:in `each'
/usr/local/Library/Homebrew/descriptions.rb:41:in `cache_fresh?'
/usr/local/Library/Homebrew/descriptions.rb:52:in `ensure_cache'
/usr/local/Library/Homebrew/descriptions.rb:100:in `search'
/usr/local/Library/Homebrew/cmd/search.rb:29:in `search'
/usr/local/Library/brew.rb:84:in `<main>'
[✘ /usr/local/Library/Taps/homebrew/homebrew-core on ⇄ master]
$ brew config
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: fbc5fc3e92587b47ddd8d8a97eb8e3a138d72957
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 7923bcf9da5f6505ee4fcaadf36f718b79076e65
Core tap last commit: 12 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
OS X: 10.9.5-x86_64
Xcode: 6.2 => /Applications/Xcode-6.2.app/Contents/Developer
CLT: 6.2.0.0.1.1424975374
Clang: 6.0 build 600
X11: 2.7.8 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_60, 1.7.0_79

I'll have a look.

@apjanke apjanke added the bug Reproducible Homebrew/homebrew-core bug label Apr 3, 2016
apjanke referenced this issue in Homebrew/brew Apr 3, 2016
Update the description update logic, since now all formulae are in the taps.
@apjanke
Copy link
Contributor

apjanke commented Apr 3, 2016

Looks like this was caused by Homebrew/brew@e9886ca; introduced in the core/formula split. It's dependent on whether you already have a descriptions cache file created, which may be why bfontaine couldn't reproduce.

Should be an easy fix.

@apjanke
Copy link
Contributor

apjanke commented Apr 3, 2016

I have a PR in for it: Homebrew/brew#12

@apjanke
Copy link
Contributor

apjanke commented Apr 3, 2016

I believe this is fixed now. Do a brew update to pick it up and let me know if it resolves things for you.

@BlindGuyNW
Copy link
Author

Resolved, and thanks. :)

On Apr 3, 2016, at 4:49 PM, Andrew Janke notifications@github.com wrote:

I believe this is fixed now. Do a brew update to pick it up and let me know if it resolves things for you.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #22 (comment)

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

No branches or pull requests

3 participants