Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sl: brew uninstall sl produces misleading warning about openssl #177425

Open
4 tasks done
woodruffw opened this issue Jul 15, 2024 · 3 comments · Fixed by #178066, #178068, #178070, #178062 or #178049
Open
4 tasks done

sl: brew uninstall sl produces misleading warning about openssl #177425

woodruffw opened this issue Jul 15, 2024 · 3 comments · Fixed by #178066, #178068, #178070, #178062 or #178049
Labels
bug Reproducible Homebrew/homebrew-core bug in progress Stale bot should stay away

Comments

@woodruffw
Copy link
Member

woodruffw commented Jul 15, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

$ brew config
HOMEBREW_VERSION: 4.3.9-265-g75e77db
ORIGIN: https://github.com/Homebrew/brew
HEAD: 75e77db9f4c5b0760d464722a3298f44785c8dc2
Last commit: 57 minutes ago
Core tap HEAD: 4f7989feaa16e0f1987a1abc6614967f0f9e32d8
Core tap last commit: 25 hours ago
Core tap JSON: 15 Jul 20:59 UTC
Core cask tap JSON: 15 Jul 20:59 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.44.0 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false
$ brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

I was trying to show sl (a very important program) to @Moisan and then uninstall it afterwards.

What happened (include all command output)?

$ brew uninstall sl
Uninstalling /opt/homebrew/Cellar/sl/5.02... (7 files, 40.0KB)

Warning: The following may be sl configuration files and have not been removed!
If desired, remove them manually with `rm -rf`:
  /opt/homebrew/etc/[email protected]
  /opt/homebrew/etc/openssl@3

What did you expect to happen?

The above, but with no misleading warning about deleting openssl's configurations.

Step-by-step reproduction instructions (by running brew commands)

brew install sl
brew uninstall sl
@woodruffw woodruffw added the bug Reproducible Homebrew/homebrew-core bug label Jul 15, 2024
@Bo98
Copy link
Member

Bo98 commented Jul 15, 2024

The word "may" is because the check for this is rudimentary: https://github.com/Homebrew/brew/blob/75e77db9f4c5b0760d464722a3298f44785c8dc2/Library/Homebrew/uninstall.rb#L69-L72. Not all formulae use the pkgetc system.

@cho-m
Copy link
Member

cho-m commented Jul 21, 2024

It does seem a bit risky to recommend rm -rf-ing directories which some users may blindly run and break functionality.

We could track etc files that are included inside bottle with some extra record keeping. Though there isn't a great way to track all etc files as some are created at runtime (may need something more manual like Casks).

This was linked to pull requests Jul 22, 2024
This was unlinked from pull requests Jul 22, 2024
@carlocab carlocab removed a link to a pull request Jul 22, 2024
This was linked to pull requests Jul 22, 2024
This was unlinked from pull requests Jul 22, 2024
@github-actions github-actions bot added the stale No recent activity label Aug 11, 2024
@woodruffw woodruffw added in progress Stale bot should stay away and removed stale No recent activity labels Aug 11, 2024
@Homebrew Homebrew deleted a comment from github-actions bot Aug 12, 2024
@cho-m
Copy link
Member

cho-m commented Oct 14, 2024

One idea is Homebrew/brew#18570; however, it only shows build-time installed configuration files and won't be able to detect generated files.

Could still keep guesses but I've seen user issues where the root cause was removing some etc file so recommending poor guesses is risky, even with additional warnings.

There doesn't seem to be an ideal option for generated files.

  • Using Cask zap style lists would probably be safest option but have higher maintenance overhead.
  • Perhaps there is an external source of common config file names that we could use.
  • Making the regex stricter/smarter may help but would need to verify how accurate and number of false positives

On formula side, we could try moving as much etc usage to pkgetc; however, this would be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug in progress Stale bot should stay away
Projects
None yet
3 participants