pipeline/test/docs: Exclude non-manpages from the test
The db-doc package happens to install quite a number of non-manpage files under /usr/share/man. This confuses the test/docs pipeline because it tries to render these files as manpages, and "man" obviously doesn't like it.
This commit filters out these non-manpage files and makes sure that we don't try to run tests on them.
Closes: #48194
Interesting... Are you sure that's not going to miss anything?
It may miss localized manpages, if we have any. On an ubuntu system:
dann-frazier@dann-frazier-laptop:~/git/extra-packages$ ls /usr/share/man
cs es hr it man1 man4 man7 pl ro sr uk zh_TW
da fi hu ja man2 man5 man8 pt ru sv vi
de fr id ko man3 man6 nl pt_BR sl tr zh_CN
What do you think about '^usr/share/.*man[1-8]/' ?
I also wonder if we shouldn't search the full set of directories in manpath
Thanks for the feedback, @dustinkirkland and @dannf.
@dustinkirkland's question made me download all -doc packages currently in the archive and check what they're installing. And @dannf's point was correct: we are indeed installing some localized manpages (e.g., usr/share/man/hu/man1/nmap.1), and therefore we need to be a bit less strict in the regexp.
However, upon looking at the other files, I noticed that there are even more cases that will need to be matched:
...
-usr/share/man/cat1/ktutil.1
-usr/share/man/cat1/pagsh.1
-usr/share/man/cat1/su.1
-usr/share/man/cat3/arg_printusage.3
-usr/share/man/cat3/ecalloc.3
-usr/share/man/cat3/emalloc.3
-usr/share/man/cat3/eread.3
-usr/share/man/cat3/erealloc.3
-usr/share/man/cat3/esetenv.3
-usr/share/man/cat3/estrdup.3
-usr/share/man/cat3/ewrite.3
-usr/share/man/cat3/getarg.3
-usr/share/man/cat3/gss_accept_sec_context.3
-usr/share/man/cat3/gss_acquire_cred.3
-usr/share/man/cat3/gss_add_cred.3
-usr/share/man/cat3/gss_add_oid_set_member.3
-usr/share/man/cat3/gss_canonicalize_name.3
-usr/share/man/cat3/gss_compare_name.3
-usr/share/man/cat3/gss_context_time.3
-usr/share/man/cat3/gss_create_empty_oid_set.3
-usr/share/man/cat3/gss_delete_sec_context.3
-usr/share/man/cat3/gss_display_name.3
-usr/share/man/cat3/gss_display_status.3
-usr/share/man/cat3/gss_duplicate_name.3
-usr/share/man/cat3/gss_export_name.3
-usr/share/man/cat3/gss_export_sec_context.3
-usr/share/man/cat3/gss_get_mic.3
-usr/share/man/cat3/gss_import_name.3
-usr/share/man/cat3/gss_import_sec_context.3
-usr/share/man/cat3/gss_indicate_mechs.3
...
@@ -22699,9 +21668,6 @@
usr/share/man/man8/zramctl.8
usr/share/man/man8/zstream.8
usr/share/man/man8/zstreamdump.8
-usr/share/man/mann/argv0.n
-usr/share/man/mann/sqlite3.n
-usr/share/man/mann/tdbc_sqlite3.n
usr/share/man/pl/man1/free.1
usr/share/man/pl/man1/mc.1
usr/share/man/pl/man1/nmap.1
@@ -22799,8 +21765,6 @@
usr/share/man/uk/man5/sysctl.conf.5
usr/share/man/uk/man8/sysctl.8
usr/share/man/uk/man8/vmstat.8
-usr/share/man/unzip.1
-usr/share/man/unzipsfx.1
usr/share/man/zh/man1/nmap.1
usr/share/man/zh_CN/man1/free.1
usr/share/man/zh_CN/man1/pgrep.1
@@ -22812,9 +21776,3 @@
usr/share/man/zh_CN/man1/tload.1
usr/share/man/zh_CN/man8/sysctl.8
usr/share/man/zh_CN/man8/vmstat.8
-usr/share/man/zip.1
-usr/share/man/zipcloak.1
-usr/share/man/zipgrep.1
-usr/share/man/zipinfo.1
-usr/share/man/zipnote.1
-usr/share/man/zipsplit.1
So yeah, not a very good situation.
I believe it's better to reverse the logic of this PR. Instead of making things more strict, I will just filter out the results that I know are not valid (e.g., anything inside usr/share/man/db/).
Let me adjust things here.
@dannf @dustinkirkland PR updated, let me know what you think.
@dannf I actually agree; I was being overly cautious and did the wrong thing here.
I've adjusted the code now.
Let's wait on this PR and use the path-prefix in it. https://github.com/wolfi-dev/os/pull/54096