aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tab.rb
AgeCommit message (Collapse)Author
2013-01-26FormulaInstaller: construct new ARGV from an Options collectionJack Nagel
The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well.
2013-01-26Tab#with? to mirror BuildOptions#with?Jack Nagel
Eventually a common interface could be factored out into a module, but for now this will suffice.
2013-01-26Refactor option handling internalsJack Nagel
Currently we handle options in several ways, and it is hard to remember what code needs an option string ("--foo"), what needs only the name ("foo") and what needs an Option object. Now that Option objects can act as strings and be converted to JSON, we can start using them instead of passing around strings between Formula objects, Tab objects, and ARGV-style arrays. The Options class is a special collection that can be queried for the inclusion of options in any form: '--foo', 'foo', or Option.new("foo").
2013-01-26Move option comparison into BuildOptionsJack Nagel
2013-01-26Clean up Tab creationJack Nagel
2012-08-29Record HEAD SHA and date of installs in receiptMax Howell
2012-08-25Rename tab 'built_bottle' to 'build_as_bottle'.Mike McQuaid
2012-08-25Move used_options and unused_options to ARGV.Mike McQuaid
2012-08-20Simplify build options APIJack Nagel
Simplify access to the different forms of a formula's build options by making options into real objects rather than strings, and expose both the 'name' and 'flag' form.
2012-08-12Fix writing build options to install receiptJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-16Record tap-origin in the install-receiptMax Howell
2012-02-10Don't return nil from Formula#linked_kegJack Nagel
Doing so was the result of a quick hack to fix the "deps installed as upgrades don't get linked" bug, but it was a mistake. Instead, always return the LinkedKegs entry as a Pathname object, and let callers be responsible for checking that it exists. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-16Store in tab whether --build-bottle flag was used.Mike McQuaid
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-05Tab: handle non-core kegs without receiptsJack Nagel
Passing Formula.factory the name of a keg that belongs to a non-core formula will cause an error to be raised; we don't really care, so just fake a totally empty install receipt in this case. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-03tab: allow retrieving tabs from arbitrary kegsJack Nagel
This will be useful in places where we need information about things other than the currently linked keg, such as `brew info`. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-13metadata: Use options from previous installsCharlie Sharpsteen
FormulaInstaller now loads the install recipt of a previous install and appends the `used_options` to ARGV before forking to build. This means `brew upgrade` will "remember" which options were invoked for the last install and re-use them. Fixes Homebrew/homebrew#5250.
2011-11-13metadata: Record installation optionsCharlie Sharpsteen
Adds a new class called `Tab` that acts as a recipt for install options. A `Tab` can be serialized to a JSON file for future reference.