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
F160999211: D34015.id104948.diff
Mon, Jun 29, 5:43 PM
Unknown Object (File)
Tue, Jun 23, 11:42 PM
Unknown Object (File)
Sun, Jun 21, 2:16 PM
Unknown Object (File)
Sat, Jun 20, 7:58 PM
Unknown Object (File)
Thu, Jun 18, 11:45 AM
Unknown Object (File)
Apr 30 2026, 1:00 AM
Unknown Object (File)
Apr 29 2026, 6:19 AM
Unknown Object (File)
Apr 29 2026, 6:11 AM

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
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 44066
Build 40954: arc lint + arc unit