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
F166803654: D34015.id101846.diff
Sun, Aug 16, 7:29 PM
F166799197: D34015.id104948.diff
Sun, Aug 16, 7:08 PM
Unknown Object (File)
Sat, Aug 15, 9:03 PM
Unknown Object (File)
Sat, Aug 15, 7:55 PM
Unknown Object (File)
Fri, Aug 14, 9:00 PM
Unknown Object (File)
Fri, Aug 14, 8:59 PM
Unknown Object (File)
Thu, Aug 13, 7:02 PM
Unknown Object (File)
Thu, Aug 13, 7:01 PM

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