Refactor meta file installation #14920

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

Contributor
adamv commented Sep 13, 2012
  • lets more text types get picked up
  • better filter for brew list

See #10141.

Contributor
adamv commented Sep 14, 2012

Should this be moved from build to formula_installer too?

Contributor

Thinking out loud: Could get rid of the FORMULA_META_FILES constant by making MetaFiles a module instead of a class, and then code could just

require 'metafiles'

...

MetaFiles.should_copy? file
Contributor
adamv commented Sep 14, 2012

@jacknagel - yeah, I'm removing it.

Contributor
adamv commented Sep 14, 2012

Error: undefined method 'should_list?' for Metafiles:Module whaaat?

Contributor

Did you extend self?

Contributor
adamv commented Sep 14, 2012

No; ought one?

Contributor

AFAIK, if you want Module.method, the options are (a) extend self or (b) def self.method. Normal method definitions only make sense when the module is to be included in another class.

Contributor
adamv commented Sep 14, 2012

Pushed; trying it this way.

Contributor
adamv commented Sep 14, 2012

I want to be able in a formula, usually a java one, usually right before libexec.install Dir['*'], to be able to install the meta files early. And also be able to scan an alternate path for them.

Contributor

Should this be moved from build to formula_installer too?

Don't think it can; the build directory is gone by then.

@adamv adamv Use a class for FORMULA_META_FILES
* lets more text types get picked up
* better filter for `brew list`
2022f47
Contributor
adamv commented Nov 11, 2012

Merged.

@adamv adamv closed this Nov 11, 2012
Contributor
MacTooth ~ $ brew --config
/usr/local/Library/Homebrew/global.rb:86:in `require': no such file to load -- metafiles (LoadError)
    from /usr/local/Library/Homebrew/global.rb:86
    from /usr/local/bin/brew:17:in `require'
    from /usr/local/bin/brew:17

This with the latest Ruby update. Not sure if it occurred before I updated Ruby. And happens with all.

MacTooth ~ $ ruby --version
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.