Page MenuHomeFreeBSD

Add the possibility to use regular expressions for the makeplist stage of the PLIST_SUB life.
ClosedPublic

Authored by mat on Jul 27 2016, 12:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 25, 4:54 AM
Unknown Object (File)
Mon, Jun 3, 8:16 AM
Unknown Object (File)
Mon, Jun 3, 8:09 AM
Unknown Object (File)
Apr 29 2024, 10:45 AM
Unknown Object (File)
Apr 29 2024, 10:45 AM
Unknown Object (File)
Apr 29 2024, 10:45 AM
Unknown Object (File)
Apr 25 2024, 9:52 AM
Unknown Object (File)
Apr 23 2024, 11:00 PM
Subscribers

Details

Summary

From time to time, the values are too generic, and they get in the way of other stuff.

This adds the possibility to have a VAR_regex=regex that will be used instead of the VAR=string to search for possible replacements.

For example, build lang/perl5-devel, then:

root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # touch `make -V STAGEDIR`/usr/local/lib/perl5/5.25/mach/foo
root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # touch `make -V STAGEDIR`/usr/local/lib/machine

Without the patch, it will do:

root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: lib/%%PERL_ARCH%%ine
Error: Orphaned: %%ARCH_LIB%%/foo
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/perl5-devel

With it will do a more correct version:

root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: lib/machine
Error: Orphaned: %%ARCH_LIB%%/foo
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/perl5-devel

Diff Detail

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

Event Timeline

mat retitled this revision from to Add the possibility to use regular expressions for the makeplist stage of the PLIST_SUB life..
mat updated this object.
mat edited the test plan for this revision. (Show Details)
mat edited edge metadata.
bdrewery added a reviewer: bdrewery.
bdrewery added a subscriber: bdrewery.

Works for me, so long as it still works everywhere. This is hard to review. I was hoping for a more automatic solution but this is fine for now.

This revision is now accepted and ready to land.Aug 9 2016, 5:50 PM

If somehow we could use \<word\> or [[:<:]]word[[:>:]] that would be nice

This revision was automatically updated to reflect the committed changes.