Message ID | 20250328-b4-pks-collect-build-fixes-v1-3-ead9deda3fbc@pks.im (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Collection of build fixes | expand |
Patrick Steinhardt <ps@pks.im> writes: > From: Eli Schwartz <eschwartz@gentoo.org> > > When building our documentation we require Perl to generate the list of > commands via "cmd-list.perl". Having a Perl interpreter available is > thus mandatory when building documentation, but Meson does not enforce > this prerequisite. Thus, when all optional features that depend on Perl > are disabled, we won't look up the Perl interpreter, which will in the > end lead to an error at setup time: > > ``` > $ meson setup builddir/ -Ddocs=man -Dperl=disabled -Dtests=false > [...] > Documentation/meson.build:308:22: ERROR: Tried to use not-found external program in "command" > ``` > > There is already a list of other cases where we do need the Perl > interpreter. Building documentation should be one of those cases, but > is missing from the list. Add it to fix the issue. > > Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> > Commit-message-edited-by: Patrick Steinhardt <ps@pks.im> > Signed-off-by: Patrick Steinhardt <ps@pks.im> > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Two puzzling things. * How is this different from 7c8cd9c1 (meson: fix perl detection when docs are enabled, but perl bindings aren't, 2025-03-16)? * This uses get_options('docs'); shouldn't it be get_option('docs')? With that changed, the patch becomes identical to the patch from May 16th, but the proposed log message seems to be vastly different. I'll drop this step from the series for now, as the other one already has been in 'next'. Thanks. > diff --git a/meson.build b/meson.build > index a8d1e63ccc6..51013c70de9 100644 > --- a/meson.build > +++ b/meson.build > @@ -772,7 +772,7 @@ endif > # features. It is optional if you want to neither execute tests nor use any of > # these optional features. > perl_required = get_option('perl') > -if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers') > +if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers') or get_options('docs') != [] > perl_required = true > endif
On Sat, Mar 29, 2025 at 10:56:45AM -0700, Junio C Hamano wrote: > Patrick Steinhardt <ps@pks.im> writes: > > > From: Eli Schwartz <eschwartz@gentoo.org> > > > > When building our documentation we require Perl to generate the list of > > commands via "cmd-list.perl". Having a Perl interpreter available is > > thus mandatory when building documentation, but Meson does not enforce > > this prerequisite. Thus, when all optional features that depend on Perl > > are disabled, we won't look up the Perl interpreter, which will in the > > end lead to an error at setup time: > > > > ``` > > $ meson setup builddir/ -Ddocs=man -Dperl=disabled -Dtests=false > > [...] > > Documentation/meson.build:308:22: ERROR: Tried to use not-found external program in "command" > > ``` > > > > There is already a list of other cases where we do need the Perl > > interpreter. Building documentation should be one of those cases, but > > is missing from the list. Add it to fix the issue. > > > > Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> > > Commit-message-edited-by: Patrick Steinhardt <ps@pks.im> > > Signed-off-by: Patrick Steinhardt <ps@pks.im> > > --- > > meson.build | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Two puzzling things. > > * How is this different from 7c8cd9c1 (meson: fix perl detection > when docs are enabled, but perl bindings aren't, 2025-03-16)? > > * This uses get_options('docs'); shouldn't it be > get_option('docs')? With that changed, the patch becomes > identical to the patch from May 16th, but the proposed log > message seems to be vastly different. Oh, yeah. I did try to double-check that the topic didn't yet end up in 'seen' or 'next', but I obviously failed. > I'll drop this step from the series for now, as the other one > already has been in 'next'. Yup, makes sense, thanks! Patrick
diff --git a/meson.build b/meson.build index a8d1e63ccc6..51013c70de9 100644 --- a/meson.build +++ b/meson.build @@ -772,7 +772,7 @@ endif # features. It is optional if you want to neither execute tests nor use any of # these optional features. perl_required = get_option('perl') -if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers') +if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers') or get_options('docs') != [] perl_required = true endif