Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/pkgsrc/pkgtools/pkglint/files/Attic/patches_test.go,v rcsdiff: /ftp/cvs/cvsroot/pkgsrc/pkgtools/pkglint/files/Attic/patches_test.go,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.36 retrieving revision 1.37 diff -u -p -r1.36 -r1.37 --- pkgsrc/pkgtools/pkglint/files/Attic/patches_test.go 2020/02/15 13:48:40 1.36 +++ pkgsrc/pkgtools/pkglint/files/Attic/patches_test.go 2020/03/22 17:43:15 1.37 @@ -596,6 +596,26 @@ func (s *Suite) Test_PatchChecker_Check_ t.CheckOutputEmpty() } +func (s *Suite) Test_PatchChecker_Check__add_hardcoded_usr_pkg(c *check.C) { + t := s.Init(c) + + lines := t.SetUpFileLines("patch-aa", + CvsID, + "", + "This patch wrongly contains the hard-coded PREFIX.", + "", + "--- Makefile", + "+++ Makefile", + "@@ -1,1 +1,1 @@", + "- prefix := @prefix@", + "+ prefix := /usr/pkg") + + CheckLinesPatch(lines, nil) + + t.CheckOutputLines( + "ERROR: ~/patch-aa:9: Patches must not hard-code the pkgsrc PREFIX.") +} + func (s *Suite) Test_PatchChecker_checkUnifiedDiff__lines_at_end(c *check.C) { t := s.Init(c)