- Formulae can now declare failures on any compiler.
- FailsWithLLVM and associated formula elements have been moved to
compat.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Rationale: we warn when inreplace makes no changes; this is a similar
sort of warning. We expected some list (probably via Dir) to include
some files, but none were found.
Either the list was wrong, or the install can now be omitted.
We mark the linked keg with an asterisk when multiple kegs exist, but
not when there is only a single keg. Start marking even in this case,
giving consistent behavior and a reliable indicate of the link status.
FixesHomebrew/homebrew#11300.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This was probably silly and I'm probably the only person that ever used
it. I still do, actually, but it's not really a completion function,
it's simple enough to just stick in a shell startup script, and removing
it makes the completion script usable under the new dynamic loading
scheme provided by bash-completion 1.99+.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This massively speeds up upgrades for certain formula, ie. formula with lots of files that aren't in the directories we link. I found upgrading android took ages before the un-tar step and it was indeed for this reason.
Using an inline Ruby script we can hit the GitHub API and look for
repositories that match the tap naming scheme. The results are cached
for the duration of the current shell session, so going over the network
is a once-per-shell-session cost.
There are a few false positives, but not much we can do about that at
this point, as taps do not have to be in the fork network of any
specific repository.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Using each_cons() "works", but to report all changes correctly we need
to look at the last elements even after we've looked at the last 3
consecutive elements.
Instead, let's parse each line of the raw diff output using a regexp.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Callers of FormulaInstaller now usually unlink the existing keg prior to
running the installer. However, Tab.for_formula uses the LinkedKeg
record to obtain the tab.
Since we need the tab to persist install options across upgrades, we
must start creating the Tab object before unlinking the old keg and
passing it to the FormulaInstaller.
FixesHomebrew/homebrew#11086.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Renamed formulae will cease to display as an add/delete pair and instead
end up the in the "Renamed" section. In the future we should be able to
take this information and use it to rename existing kegs during updates,
allowing us to rename formulae without breaking upgrades.
Renaming a formula requires renaming the class, so there will be at
least one add/delete pair in the file. Thus, the similarity threshold
for detecting renames is set at 85% to allow a little bit of content
turnover without losing track of the rename.
ClosesHomebrew/homebrew#11158.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.
ClosesHomebrew/homebrew#11078.
share/info files were always being linked if they existed, regardless of
whether the user had HOMEBREW_KEEP_INFO set. This primarily affects
users with software built before
9610ff2e9e06931693f49d4377ee26c0e664c547.
This also fixes a bug in Keg#link_dir, in which a file would always be
linked if no argument was passed.
The regexp that handles skipping info files was only skipping
info/*.info files, but several formula would create info/dir files as
well. Since these conflicted with each other, Homebrew would error out
during the linking step.
The print wrapper which has its own `puts` broke this line; though with
the changes to `link` it isn't necessary any longer, so just remove it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too.
This will prevent the tickets like Homebrew/homebrew#11050 from occurring.