Page MenuHomeFreeBSD

framework: add hook to detect whether new ports are hooked into the tree
ClosedPublic

Authored by tcberner on Jan 24 2022, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 12, 12:30 PM
Unknown Object (File)
Sun, May 11, 9:35 PM
Unknown Object (File)
Sun, May 11, 12:30 PM
Unknown Object (File)
Sat, May 10, 9:18 PM
Unknown Object (File)
Sun, May 4, 2:36 PM
Unknown Object (File)
Fri, Apr 25, 4:29 PM
Unknown Object (File)
Mar 14 2025, 1:11 AM
Unknown Object (File)
Feb 20 2025, 5:49 PM
Subscribers

Details

Summary

This pre-commit hook looks for newly added files matching
foo/bar/Makefile
For these files, it is checking that a SUBDIR+=bar entry is
present in foo/Makefile.

This is likely not yet all-there, and should/could probably be
extended to also make sure that foo/Makefile is staged too, and
also handle port removals...

Example run output:

	> mkdir -p graphics/test_port
	> touch graphics/test_port/Makefile
	> git add graphics/test_port/Makefile
	> git commit -m "[new port] graphics/test_port: antoine will send you a mail"
	[pre-commit] ERROR: Missing 'SUBDIR += test_port' in graphics/Makefile

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable