Skip to content

fix(build): kill chg daemon before installing#939

Open
vegerot wants to merge 1 commit into
facebook:mainfrom
vegerot:pr939
Open

fix(build): kill chg daemon before installing#939
vegerot wants to merge 1 commit into
facebook:mainfrom
vegerot:pr939

Conversation

@vegerot

@vegerot vegerot commented Aug 25, 2024

Copy link
Copy Markdown
Contributor

Summary:
Frequently, if I have sl running when trying to upgrade sl, I get this error
during make install-oss:

$ make install-oss
...
rm -f sl
cp build/scripts-3.11/sl sl
mkdir -p //usr/local/bin
cp sl //usr/local/bin
cp: cannot create regular file '//usr/local/bin/sl': Text file busy
make: *** [Makefile:99: install-oss] Error 1

This diff works around the issue by killing the chg daemon before installing
the new version of sl.

I also added a sleep 1 after killing the chg daemon, because I was still
seeing the issue occasionally without it. I really dislike adding this sleep,
so I'd appreciate any suggestions

Test Plan:

This happens to me about 75% of the time I try to upgrade sl, but I don't have
reliable reproduction steps

Summary:
Frequently, if I have sl running when trying to upgrade sl, I get this error
during `make install-oss`:

```sh
$ make install-oss
...
rm -f sl
cp build/scripts-3.11/sl sl
mkdir -p //usr/local/bin
cp sl //usr/local/bin
cp: cannot create regular file '//usr/local/bin/sl': Text file busy
make: *** [Makefile:99: install-oss] Error 1
```

This diff works around the issue by killing the chg daemon before installing
the new version of sl.

I also added a `sleep 1` after killing the chg daemon, because I was still
seeing the issue occasionally without it.  I really dislike adding this sleep,
so I'd appreciate any suggestions

Test Plan:

This happens to me about 75% of the time I try to upgrade sl, but I don't have
reliable reproduction steps
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@quark-zju

Copy link
Copy Markdown
Contributor

Perhaps you can rm the destination before cp? That does not require killing processes (which might be surprising).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants