Skip to content
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

meson: use more idiomatic manpage checks #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mathstuf
Copy link
Collaborator

The "man" option is defined as a meson feature option. Feature options possess tristate values, but using the .allowed() method casts it to a dual-valued option. Effectively, both "auto" and "enabled" were treated as boolean true, and disabled was treated as boolean false.

find_program was informed that it should always check for the manpage generator, but with a boolean required: kwarg, it is nonfatal if not found. That meant configuring with "man=disabled", the manpage would be automatically built if the generator program was available, and with "man=auto" the project would fatally error when configuring but the generator program was not available. This is clearly confusing/wrong, so pass the option value directly instead.

The default value of the option was formerly effectively set to "auto". Change its value to truly be that, so that the default behavior is preserved.


Resubmission of mathstuf/systemd-ui-old#6 to this more official repository.

The "man" option is defined as a meson feature option. Feature options
possess tristate values, but using the .allowed() method casts it to a
dual-valued option. Effectively, both "auto" and "enabled" were treated
as boolean true, and disabled was treated as boolean false.

find_program was informed that it should always check for the manpage
generator, but with a boolean `required:` kwarg, it is nonfatal if not
found. That meant configuring with "man=disabled", the manpage would be
automatically built if the generator program was available, and with
"man=auto" the project would fatally error when configuring but the
generator program was not available. This is clearly confusing/wrong, so
pass the option value directly instead.

The default value of the option was formerly effectively set to "auto".
Change its value to truly be that, so that the default behavior is
preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants