Error: Formula XXX will not import. #12504

Closed
loranger opened this Issue May 30, 2012 · 22 comments

Projects

None yet

8 participants

@loranger

Hello

As a conscientious user, I update, upgrade cleanup and doctor my homebrew on a daily basis, but I got more and more
Error: Formula XXX will not import.
on brew doctor.

It seems removed formulas are responsible of those messages but I would like to know if there is a way to clean this unstable state to avoid such frightening messages 😁

@mistydemeo

Can you please paste an example of this to gist.github.com?

Have you replaced your /usr/bin/ruby?

@loranger

Shure, here it is.

No, I did not touch ruby, it's still at the right place in the state I found it ;)

@mistydemeo

It looks like those are all php formulae, which were recently moved to a dedicated repository. Do you have josegonzalez/homebrew-php tapped?

@loranger

I do, but I used to use the "official" formulas before.
Do I have to report an issue at josegonzalez instead ?

@lifepillar

That has happened to me, too, when I switched from php formulas to php54 formulas. I solved the problem by simply deleting (e.g. rm /usr/local/Library/formula/php-apc.rb) the old php formulas.

@josegonzalez
Homebrew member

Problem is these formulae were removed, and calling brew update properly symlinks the new links, but it doesn't unlink removed - or, in this case, renamed - formulae.

This isn't a bug in homebrew-php, just something not considered when building brew tap.

@Fl4t

Same here.

@josegonzalez
Homebrew member

@mistydemeo I don't think @mxcl responds to ICMP packets.

@loranger

I may be wrong (then stop me), but maybe brew cleanup should remove those obsolete formulaes, don't you think so ?

@loranger

Yeah, I know it does not (that's why I opened this issue) but in my opinion, it would/should.
But maybe that behaviour could create issues with custom personal formulaes ?

@ghost

so what do we do? try to clean up brew manually or install it anew and not use tap anymore?

@opengeek

I'm stuck on this too? Anyone have a solution?

@adamv

Untap the offending repository, or fix the offending formula.

@adamv adamv was assigned Jun 8, 2012
@ghost

@adamv since untapping and re-tapping doesnt help, how do I fix the offending formula?

@josegonzalez
Homebrew member

rm the unlinked formula within your Formula folder.

@ghost

I think that worked, thanks

@mxcl
Homebrew member

So the problem is the tap renamed the formula and this was not cleaned up by brew update, right?

@josegonzalez
Homebrew member

Correct. I don't get into the habit of renaming formulae, but it was necessary in this case to support multiple PHP versions.

@mxcl
Homebrew member

Right, okay. Thanks.

Worth noting renaming formula in general breaks brew at this point. Since if a formula was installed under the old name it will not get upgrades. Though this will be fixed.

I will look into fixing the tap issue though as this is separate.

@adamv

Closing since the issue here was discussed, and we have another open issue to support renames.

@adamv adamv closed this Aug 28, 2012
@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.