Comments (11)
Great. Thanks for the explanation. And the fix.
from brew.
Step-by-step reproduction instructions (by running
brew
commands)
@metayan If you follow these instructions yourself: does it both install all these formulae and remove them? If you install them manually: are they removed every time?
from brew.
Installed darktable 4.6.1 again, by tweaking the formula.
Then removed darktable.
This time the removal also tried to autoremove
other things:
brew install --cask darktable
==> Downloading https://github.com/darktable-org/darktable/releases/download/release-4.6.1/darktable-4.6.1-x86_64.dmg
==> Installing Cask darktable
==> Moving App 'darktable.app' to '/Applications/darktable.app'
🍺 darktable was successfully installed!
brew remove darktable
==> Uninstalling Cask darktable
==> Backing App 'darktable.app' up to '/usr/local/Caskroom/darktable/4.6.1/darktable.app'
==> Removing App '/Applications/darktable.app'
==> Purging files for version 4.6.1 of Cask darktable
==> Autoremoving 1 unneeded formula:
ntfs-3g
Error: ntfs-3g is pinned. You must unpin it to uninstall.
brew info ntfs-3g
==> ntfs-3g: stable 2022.10.3, HEAD [pinned at 2017.3.23_3]
Read-write NTFS driver for FUSE
https://www.tuxera.com/community/open-source-ntfs-3g/
Installed
/usr/local/Cellar/ntfs-3g/2017.3.23_3 (89 files, 1.7MB) *
Poured from bottle on 2020-06-20 at 01:53:27
Feel free to ask for more info if needed.
from brew.
I just feel that removing a cask – that has no Homebrew dependencies – shouldn't remove any installed apps that have nothing to do with the cask in question.
from brew.
What does brew autoremove --dry-run
output?
from brew.
brew autoremove --dry-run
==> Would autoremove 1 unneeded formula:
ntfs-3g
But it already removed all the autoremovable formulas before, when doing
brew remove darktable
as I reported above.
And ntfs-3g
is pinned.
from brew.
@metayan Can you paste the output of cat $(brew --prefix ntfs-3g)/INSTALL_RECEIPT.json
? Thanks.
from brew.
cat $(brew --prefix ntfs-3g)/INSTALL_RECEIPT.json |jq '.'
{
"homebrew_version": "2.4.0-53-g748af98",
"used_options": [],
"unused_options": [],
"built_as_bottle": true,
"poured_from_bottle": true,
"installed_as_dependency": null,
"installed_on_request": null,
"changed_files": [
"sbin/mount_ntfs",
"INSTALL_RECEIPT.json",
"lib/pkgconfig/libntfs-3g.pc"
],
"time": 1592610807,
"source_modified_time": 1490262180,
"HEAD": null,
"stdlib": null,
"compiler": "clang",
"aliases": [],
"runtime_dependencies": [
{
"full_name": "gettext",
"version": "0.20.2"
}
],
"source": {
"path": "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ntfs-3g.rb",
"tap": "homebrew/core",
"spec": "stable",
"versions": {
"stable": "2017.3.23",
"devel": "",
"head": "HEAD",
"version_scheme": 0
}
}
}
from brew.
"installed_as_dependency": null, "installed_on_request": null,
These lines are causing autoremove
to try and remove the formula. You can stop this from happening by running:
brew tab --installed-on-request ntfs-3g
I'm not totally sure why the values where written as null
, but perhaps it has something to do with brew pin
handling? Either way, we should handle this case by erring on the side of caution and not removing the formula. I've opened a PR to implement this.
from brew.
The pinned formula was not removed, so no worries about that.
The issue is that 89 formulas were autoremoved when a cask was removed. Formulas that had nothing to do with the cask.
As can be seen above after
==> Autoremoving 89 unneeded formulae:
At least a request for confirmation that 89 formulas will be removed would be appropriate.
from brew.
The PR merged should indeed fix this problem.
In this case, the problem seems to be that somehow the install metadata on your system was messed up, and did not properly mark that those formulae were installed at your request (as opposed to as a dependency for something else). I'm not sure at the moment why that happened, but the PR I merged strengthens the check so that Homebrew treats messed up metadata as "not sure, but let's assume they are installed on request and keep them around just in case." In the future, autoremove will only remove formulae that have "installed_on_request": false
(as opposed to null
) to avoid this from happening again.
from brew.
Related Issues (20)
- RUSTFLAGS behavior should match CFLAGS when building from source HOT 2
- `brew typecheck` fails on arm64 w/o rosetta installed HOT 2
- Show cask dependencies with `brew deps` and `brew info` HOT 1
- Installation via .pkg (version 4.3.7) failing HOT 4
- bump-formula-pr: Expected type String, got type Version HOT 1
- Include `brew` in error messages HOT 2
- vendor-install.sh: line 232: 96040 Killed: 9 HOT 2
- Allow systemctl stop on keep_alive services - Restart=on-failure HOT 5
- Supplying `--fetch-HEAD` to `brew outdated` hides version details HOT 4
- brew install fails if /tmp is open in Finder HOT 9
- Feature request: Include `disable!` `date` in deprecation warning logs
- Homebrew not updating HOT 3
- Publish ubuntu 24.04 docker image to hub.docker.com (CD flow exist already) HOT 9
- renamed formulas results in dupes HOT 2
- Add support for downloading formula and cask binaries in the background HOT 3
- Automatically disable deprecated formulae HOT 2
- Homebrew is broken on Debian running under WSL2 HOT 1
- `Error: bad URI(is not URI?):` when search item contains a space HOT 1
- Support TunSafe: https://github.com/TunSafe/TunSafe/tree/release/1.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brew.