From: Peter Maydell <peter.maydell@linaro.org>
To: Kevin Wolf <kwolf@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org,
	qemu-block@nongnu.org, timao@redhat.com
Subject: Re: [PATCH 2/5] docs: Only mention iscsi in the man page when available
Date: Mon, 31 Jan 2022 18:57:53 +0000	[thread overview]
Message-ID: <CAFEAcA-HS3VA4o-ZOAz1bMAymC39ntfba0HouOXH31FVZy230w@mail.gmail.com> (raw)
In-Reply-To: <20220131170411.125198-3-kwolf@redhat.com>
On Mon, 31 Jan 2022 at 17:33, Kevin Wolf <kwolf@redhat.com> wrote:
>
> If libiscsi is disabled in the build, the man page shouldn't contain
> information on how to construct iscsi URLs etc.
>
> This patch is best viewed with whitespace changes ignored.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> -``iSCSI``
> -   iSCSI support allows QEMU to access iSCSI resources directly and use
> -   as images for the guest storage. Both disk and cdrom images are
> -   supported.
> +.. only:: not DISABLE_LIBISCSI
Unfortunately the Sphinx "only::" tag is unusably broken by design.
It doesn't work the way you might expect (similar to ifdef, making
the docs be built as if the markup disabled by only:: was not
present in the source rst files). Instead it filters out generated
doctree nodes very late. The effect is that documentation that you
try to suppress with an 'only' directive will still show up in
the table of contents, index and search.
Upstream bug, closed 'wontfix':
https://github.com/sphinx-doc/sphinx/issues/1420
I ran into this when I was looking at whether there were nicer ways
to structure how we generate some of our manpages etc. Unfortunately
my conclusion was that the only safe approach was to avoid use
of the 'only::' directive entirely :-(
thanks
-- PMM
next prev parent reply	other threads:[~2022-01-31 19:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 17:04 [PATCH 0/5] docs: Don't document disabled features Kevin Wolf
2022-01-31 17:04 ` [PATCH 1/5] docs: Pass disabled configure options to sphinx Kevin Wolf
2022-01-31 17:53   ` Daniel P. Berrangé
2022-01-31 17:04 ` [PATCH 2/5] docs: Only mention iscsi in the man page when available Kevin Wolf
2022-01-31 18:57   ` Peter Maydell [this message]
2022-02-01  8:40     ` Kevin Wolf
2022-01-31 17:04 ` [PATCH 3/5] docs: Only mention ssh " Kevin Wolf
2022-01-31 17:04 ` [PATCH 4/5] docs: Only mention curl " Kevin Wolf
2022-01-31 17:04 ` [PATCH 5/5] docs: Only mention gluster " Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=CAFEAcA-HS3VA4o-ZOAz1bMAymC39ntfba0HouOXH31FVZy230w@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=timao@redhat.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).