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

formula: add .keepme files to prevent cleanup #19138

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

MikeMcQuaid
Copy link
Member

Allow the use of .keepme files inside a keg to prevent the cleanup.

Rather than having a binary state of "never cleanup if .keepme is present" and "can cleanup without", instead a .keepme file is essentially providing reference counting.

It can contain one or more lines which reference files on disk. If the file exists, the .keepme file will prevent cleanup. If/when it does not: brew cleanup will happily cleanup this keg (providing all other conditions apply).

Allow the use of `.keepme` files inside a keg to prevent the cleanup.

Rather than having a binary state of "never cleanup if `.keepme` is
present" and "can cleanup without", instead a `.keepme` file is
essentially providing reference counting.

It can contain one or more lines which reference files on disk. If the
file exists, the `.keepme` file will prevent cleanup. If/when it does
not: `brew cleanup` will happily cleanup this keg (providing all other
conditions apply).
@MikeMcQuaid MikeMcQuaid force-pushed the formula_cleanup_keepme branch from d6b19ac to aeaeccc Compare January 23, 2025 14:29
@MikeMcQuaid MikeMcQuaid enabled auto-merge January 23, 2025 14:48
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jan 23, 2025
Merged via the queue into master with commit 2eb6f49 Jan 23, 2025
28 checks passed
@MikeMcQuaid MikeMcQuaid deleted the formula_cleanup_keepme branch January 23, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants