-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean pod2man-generated manpages after formula build #19174
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, thanks!
Introduce a new DSL that performs the same/similar transformations on a provided file (or all files in a formula's man directory), e.g. clean_pod2man_outputs! or something like that, which would need to be called explicitly.
I'd actually probably favour doing this unconditional as part of Keg relocation logic?
Fair, that makes sense. One less DSL block/method to worry about that way. If the change is made in the keg relocation logic, then this shim is not needed (it wasn't clear to me from your comment which of these - unconditional logic addition vs new shim - is preferred). |
I'd probably prefer the unconditional logic but don't feel strongly if you hate it! |
I ended up adding the logic at the end of build rather than at keg relocation, since the transformation should only run when building from source, not always when an installation occurs (e.g. pouring from bottle won't need this). One other consideration: this currently runs on all formulae which put the perl version in the footer, including |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks!
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?As noted in Homebrew/homebrew-core#191352 (comment), one factor which hinders
:all
bottles from being built is that Perl documentation generation viapod2man
embeds some version information about the version ofperl
and tools used.This change introduces logic to search for and replace/adjust the following occurrences in manpages:
perl
version is inserted in the footer. Search for this and replace it with an empty string.Pod::Man
andPod::Simple
are inserted in a comment in the resulting *roff output. Find/replace the generated line in the output to remove those occurrences.Alternatives
pod2man
to try to catch/fix these cases on each invocation ofpod2man
, rather than doing a sweep at the endman
directory), e.g.clean_pod2man_outputs!
or something like that, which would need to be called explicitly, for use in individual formulae which need it.