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

Fix spurious creation of '=' file #98

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

JohnoKing
Copy link

@JohnoKing JohnoKing commented Jul 27, 2020

The build system on certain platforms will create a spurious '=' file in the repository's root directory due to an incorrect assumption the checksh function makes about the shell. The following is quoted from @saper:

When running under FreeBSD /bin/sh (and not ksh) we get spurious file named '=' created in the root. This is because the "checksh" function runs /bin/sh -c '(( .sh.version >= 20111111 ))' which produces a "=" file with /bin/sh as a side effect.

The bugfix simply makes sure the shell supports (( ... )) expressions before attempting to check ${.sh.version}. This bug was reported in #13, but that issue was closed in error. I was still getting an "=" file to generate on FreeBSD.

References:
att#963 (comment)
https://bsd.network/@saper/103196289917156347
https://repo.or.cz/INIT.git

The following is quoted from Marcin Cieślak [*]:
When running under FreeBSD /bin/sh (and not ksh) we get spurious
file named '=' created in the root. This is because the "checksh"
function runs /bin/sh -c '(( .sh.version >= 20111111 ))' which
produces a "=" file with /bin/sh as a side effect.

This bug was reported in ksh93#13, but was closed in error. I
was still getting the "=" file to generate on FreeBSD.

bin/package,
src/cmd/INIT/package.sh:
- Fix the creation of a spurious '=' file by making sure the shell
  has support for (( ... )) expressions.

.gitignore:
- Remove the '=' file entry since it no longer has a purpose.

[*]: https://bsd.network/@saper/103196289917156347
src/cmd/INIT/package.sh Outdated Show resolved Hide resolved
@McDutchie McDutchie merged commit 05081df into ksh93:master Jul 27, 2020
@JohnoKing JohnoKing deleted the remove-spurious-equals branch July 27, 2020 12:29
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