Brew: Create `.keepme` files in directories after creation/`brew update`

Created on 27 Jun 2019  ·  9Comments  ·  Source: Homebrew/brew

A detailed description of the proposed feature

The top-level directories in /usr/local e.g. /usr/local/sbin should have a .keepme file or similar created in them to avoid their removal in the macOS Catalina 10.15 installer.

The motivation for the feature

Avoid users having to manually sudo to recreate these directories.

How the feature would be relevant to at least 90% of Homebrew users

Most Homebrew users will end up upgrading to 10.15.

What alternatives to the feature have been considered

Requiring users to manually recreate these.

good first issue help wanted outdated

All 9 comments

Can I pick this one ?

@veera83372, go ahead! 👍

Hi, do you have any further information or a reference by Apple how this file is honored? Asking because I'm already using Catalina Beta 8 and the folders haven't been removed yet even without this file. It could be relevant to some of my projects but I've tried to search for and was unable to find any sources.

@KizzyCode I don't have a public source, sorry. I believe @fxcoudert saw this during testing and we were advised by Apple engineers to do this.

This is the only thread I found regarding this issue. Sorry if I'm posting in the wrong place.

I think brew update is adding this file: /usr/loca/sbin/.keepme
and then brew doctor gives this warning:

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

Everything works, but I was wondering if there's a way to avoid the extraneous warning without breaking something else in brew.

Thank you for your time.

@zhao-li I fixed this in #6568 😄

Yay! Thanks😁

On Oct 9, 2019, at 4:34 AM, Simon Olofsson notifications@github.com wrote:

@zhao-li I fixed this in #6568 :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vitahlin picture vitahlin  ·  4Comments

hktalent picture hktalent  ·  4Comments

paanvaannd picture paanvaannd  ·  4Comments

Rotonen picture Rotonen  ·  4Comments

VagelisD picture VagelisD  ·  3Comments