Open kidonng opened 1 day ago
Did you do a targeted upgrade, i.e. brew upgrade pkg-config
or brew upgrade pkgconf
instead of just brew upgrade
? If so, that marks the package as installed-on-request. The same goes for brew reinstall <formula>
.
If all you did was brew upgrade
, then that begs the question: should any install operation change the installed-on-request status of already-installed formulae?
Anyway, the workaround: brew tab --no-installed-on-request pkgconf
.
It seems that a plain brew upgrade
did cause pkgconf
to be marked as installed on request although pkg-config
wasn't previously. I reproduced this locally.
installed_as_dependency
in the tab, on the other hand, changed from true
to false
.
That seems like a bug to me. In fact, as I mentioned elsewhere, it's puzzling that anything but the original formula install (requested or dependency) should automatically change those flags. Surely the fact that XYZ
needs to be reinstalled doesn't change the reason it was installed in the first place?
It seems that a plain
brew upgrade
did causepkgconf
to be marked as installed on request althoughpkg-config
wasn't previously. I reproduced this locally.
@ZhongRuoyu seems like a bug with the alias migration stuff for png-config
.
If all you did was
brew upgrade
, then that begs the question: should any install operation change the installed-on-request status of already-installed formulae?
brew install foo
should at least change this status for foo
. This is consistent with what apt-get
does.
Increasingly I wonder if brew upgrade foo
should do so, that seems a bit more ill advised.
brew upgrade
should not/never.
Did you do a targeted upgrade, i.e.
brew upgrade pkg-config
orbrew upgrade pkgconf
instead of justbrew upgrade
?
Just brew upgrade
, same as the result @ZhongRuoyu has reproduced.
Anyway, the workaround:
brew tab --no-installed-on-request pkgconf
.
I don't think that is enough to avoid it in Brewfile
since brew bundle
checks both installed_on_request
and installed_as_dependency
:
(As for my case I corrected the fields in INSTALL_RECEIPT.json
manually)
I guess trying to find old Keg fails as new directory doesn't exist on filesystem for formula-to-alias as opposed to rename migrator https://github.com/Homebrew/brew/blob/798136976623b0a865f67babe0e1007390556729/Library/Homebrew/upgrade.rb#L135-L137
So false || nil
is nil
which gets compacted and the default installed_on_request: true
is used.
https://github.com/Homebrew/brew/blob/798136976623b0a865f67babe0e1007390556729/Library/Homebrew/upgrade.rb#L151
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
pkg-config
was installed as a dependency ofrust
on my machine. https://github.com/Homebrew/homebrew-core/pull/194885 replacedpkg-config
withpkgconf
, and after upgrading and doingbrew bundle dump
, I noticedpkgconf
now becomes part of the generated Brewfile, which it probably shouldn't:What happened (include all command output)?
After investigation it turns out
pkgconf
is somehow marked asinstalled_on_request
after upgrading:What did you expect to happen?
Compared to a normal dependency:
Step-by-step reproduction instructions (by running
brew
commands)