fix: resolve formula aliases before tracking installed packages#20
Open
jerryjrxie wants to merge 2 commits intoopenbootdotdev:mainfrom
Open
fix: resolve formula aliases before tracking installed packages#20jerryjrxie wants to merge 2 commits intoopenbootdotdev:mainfrom
jerryjrxie wants to merge 2 commits intoopenbootdotdev:mainfrom
Conversation
Homebrew has formula aliases where the requested name differs from the actual installed name. Examples: - postgresql → installs as postgresql@18 - kubectl → installs as kubernetes-cli This caused packages to be reinstalled on every run because the state file tracked the alias name (e.g., postgresql) but brew list returns the actual name (e.g., postgresql@18), so they never matched during reconciliation. Fix: - Added ResolveFormulaName() function to resolve aliases using brew info --json - Updated all package tracking to use resolved names - Handles both CLI packages and casks Closes openbootdotdev#17 (formula alias tracking issue)
|
👋 Thanks for opening this pull request! 🎉 This is your first PR to OpenBoot — welcome! Before merging:
@fullstackjam will review this soon. Thanks for contributing! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an issue where packages with formula aliases (like
postgresql→postgresql@18) were being reinstalled on every run because the state tracking didn't match the actual installed names.Problem
Homebrew has formula aliases where the requested name differs from the actual installed name:
postgresql→ installs aspostgresql@18kubectl→ installs askubernetes-cliThe state file tracked the alias name ("postgresql") but
brew listreturns the actual name ("postgresql@18"), so they never matched during state reconciliation. This caused packages to be reinstalled every time openboot ran.Solution
ResolveFormulaName()function that usesbrew info --jsonto resolve aliases to canonical namesInstallWithProgress()to use resolved names:Testing
postgresqlandkubectlnow resolve to their canonical names before trackinggo vetpassesRelated
This complements PR #18 which fixed GUI apps being skipped. Both issues affected package tracking but for different reasons.