* [LTP] [PATCH] configure: Fix summary for --disable-metadata
@ 2022-01-20 12:40 Cyril Hrubis
2022-01-20 13:20 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2022-01-20 12:40 UTC (permalink / raw)
To: ltp
This changes the m4/ltp-docparse.m4 to skip the detection and sets the
corresponding variables so that we get correct summary when the metadata
are disable by users.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
m4/ltp-docparse.m4 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/m4/ltp-docparse.m4 b/m4/ltp-docparse.m4
index 88d2e08e4..9514e5e1e 100644
--- a/m4/ltp-docparse.m4
+++ b/m4/ltp-docparse.m4
@@ -35,7 +35,13 @@ with_metadata=no
with_metadata_html=no
with_metadata_pdf=no
-if test "x$enable_metadata" = xyes && test "x$enable_metadata_html" = xyes -o "x$enable_metadata_pdf" = xyes; then
+if test "x$enable_metadata" != xyes; then
+ enable_metadata_html=no
+ enable_metadata_pdf=no
+ with_metadata_generator=none
+fi
+
+if test "x$enable_metadata_html" = xyes -o "x$enable_metadata_pdf" = xyes; then
AX_PROG_PERL_MODULES(Cwd File::Basename JSON LWP::Simple)
fi
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] configure: Fix summary for --disable-metadata
2022-01-20 12:40 [LTP] [PATCH] configure: Fix summary for --disable-metadata Cyril Hrubis
@ 2022-01-20 13:20 ` Petr Vorel
2022-01-24 14:02 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2022-01-20 13:20 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> This changes the m4/ltp-docparse.m4 to skip the detection and sets the
> corresponding variables so that we get correct summary when the metadata
> are disable by users.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
LGTM, I'm for applying this before release.
./configure --disable-metadata-pdf --disable-metadata-html
...
configure: metadata generation disabled
...
METADATA
metadata generator: detect
HTML metadata: no
PDF metadata: no
=> this case is not handled well. Output during configure ("metadata generation
disabled") is IMHO more descriptive than our summary - "detect" can be confusing
for people. We could further tweak configure.ac:
@@ -43,6 +43,9 @@ fi
if test "x$enable_metadata_html" = xyes -o "x$enable_metadata_pdf" = xyes; then
AX_PROG_PERL_MODULES(Cwd File::Basename JSON LWP::Simple)
+else
+ with_metadata=no
+ with_metadata_generator=none
fi
---
=> would lead to:
METADATA
metadata generator: none
HTML metadata: no
PDF metadata: no
But instead of that I'd also adjusted the summary to print "metadata disabled"
to reflect the reality, i.e. apply also my patch
https://lore.kernel.org/ltp/20220114125513.895-1-pvorel@suse.cz/
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-24 14:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-20 12:40 [LTP] [PATCH] configure: Fix summary for --disable-metadata Cyril Hrubis
2022-01-20 13:20 ` Petr Vorel
2022-01-24 14:02 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox