Sunday, November 03, 2024

pkglocatedb flavor

pkg_mklocatedb includes an option -K that will store all pkg_create
annotations such as fontdir, etc

even though it makes for a much larger pkglocatedb, it can occasionally be
useful for introspection purposes (like finding out if some directories
contain several types of info, like info files + man pages... should be
rather unlikely, I know...)

Could we build this by default ? shouldn't take too much extra time.

Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/Makefile,v
diff -u -p -r1.477 Makefile
--- Makefile 15 Nov 2023 13:39:26 -0000 1.477
+++ Makefile 3 Nov 2024 09:25:44 -0000
@@ -151,6 +151,7 @@
SUBDIR += pgtap
SUBDIR += pgtcl
SUBDIR += pkglocatedb
+ SUBDIR += pkglocatedb,keywords
SUBDIR += ports-readmes
SUBDIR += ports-readmes-dancer
SUBDIR += postgresql
Index: pkglocatedb/Makefile
===================================================================
RCS file: /cvs/ports/databases/pkglocatedb/Makefile,v
diff -u -p -r1.36 Makefile
--- pkglocatedb/Makefile 11 Mar 2022 18:31:37 -0000 1.36
+++ pkglocatedb/Makefile 3 Nov 2024 09:25:44 -0000
@@ -11,7 +11,13 @@ PERMIT_PACKAGE = Yes

BUILD_DEPENDS = databases/sqlports,-list

+FLAVORS = keywords
+FLAVOR ?=
+
ARGS = -a -p ${PORTSDIR}
+.if ${FLAVOR:Mkeywords}
+ARGS += -K
+.endif

do-build:
@if test -s ${WRKBUILD}/ouch; then \
Index: pkglocatedb/pkg/DESCR
===================================================================
RCS file: /cvs/ports/databases/pkglocatedb/pkg/DESCR,v
diff -u -p -r1.7 DESCR
--- pkglocatedb/pkg/DESCR 15 Oct 2017 16:06:42 -0000 1.7
+++ pkglocatedb/pkg/DESCR 3 Nov 2024 09:25:44 -0000
@@ -2,3 +2,6 @@ Database of files from all packages in t
of the packages containing them. This is in a format suitable for use with
locate(1), for instance through the convenience script
${PREFIX}/bin/pkg_locate
+
+Flavor: keywords
+also include annotations like @fontdir and friends

No comments:

Post a Comment