Skip to content

fix: metadata build target — gawk dependency, missing redirect, missing HEAD#508

Open
braceyourself wants to merge 1 commit intoforge-ext:mainfrom
braceyourself:fix/makefile-metadata-build
Open

fix: metadata build target — gawk dependency, missing redirect, missing HEAD#508
braceyourself wants to merge 1 commit intoforge-ext:mainfrom
braceyourself:fix/makefile-metadata-build

Conversation

@braceyourself
Copy link

@braceyourself braceyourself commented Feb 26, 2026

Summary

Building from source on Ubuntu/Debian produces a broken preferences dialog because the metadata Makefile target uses awk -i inplace, which is a gawk-only feature — these distros ship mawk as the default awk. Make aborts on the error, leaving lib/prefs/metadata.js truncated:

Screenshot from 2026-02-26 11-39-16

Also fixes two other bugs in the same target that made the developers list empty on all distros:

  • git shortlog -sne output was going to stdout instead of the file (missing >>)
  • git shortlog without explicit HEAD reads from stdin in non-interactive builds (CI, makepkg, rpmbuild), producing no output

Changes

  • Replace gawk-only awk -i inplace with portable sed -i -E
  • Redirect shortlog output to the file with explicit HEAD

…ng HEAD

`make build` fails on systems where `awk` is mawk (Ubuntu, Debian, and
derivatives) because the `metadata` target uses `awk -i inplace`, a
gawk-only extension. Make aborts on the error, leaving
`lib/prefs/metadata.js` truncated — which crashes the preferences dialog:

  SyntaxError: expected expression, got end of script

Two additional bugs in the same target:

- `git shortlog -sne` output goes to stdout instead of the file
  (missing `>>`), so the developers array is always empty even on gawk
  systems where the build succeeds
- Without an explicit `HEAD` argument, `git shortlog` reads from stdin
  in non-interactive environments (CI, makepkg, rpmbuild), producing
  no output

Replaces gawk-only `awk -i inplace` with portable `sed -i -E`.
Redirects shortlog output to the file with explicit `HEAD`.
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.

1 participant