DPDK patches and discussions
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, thomas@monjalon.net,
	marko.kovacevic@intel.com, Luca Boccassi <bluca@debian.org>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] doc: fix garbage text in generated HTML guides
Date: Wed,  5 Dec 2018 14:25:45 +0000	[thread overview]
Message-ID: <20181205142545.24633-1-bluca@debian.org> (raw)

If the user has MAKEFLAGS set in the environment when building the
documentation, the doc/guides/conf.py script which calls "make"
exclusively to get the project version might pick up garbage from
stdout, like:

<title>FAQ &mdash; Data Plane Development Kit make[2]:
Entering directory &#39;/build/1st/dpdk-18.11/doc/guides&#39;
18.11.0
make[2]: Leaving directory &#39;/build/1st/dpdk-18.11&#39;
documentation</title>

Override MAKEFLAGS in the Python subprocess call to avoid this issue.

Fixes: f7aaae2fe6f7 ("doc: add copyright and version")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 doc/guides/conf.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index c883306d7..da99a3f84 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -9,6 +9,7 @@
 from sphinx.highlighting import PygmentsBridge
 from pygments.formatters.latex import LatexFormatter
 from os import listdir
+from os import environ
 from os.path import basename
 from os.path import dirname
 from os.path import join as path_join
@@ -37,7 +38,9 @@
 html_show_copyright = False
 highlight_language = 'none'
 
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'])
+# If MAKEFLAGS is exported by the user, garbage text might end up in version
+version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'],
+                                  env=dict(environ, MAKEFLAGS=""))
 version = version.decode('utf-8').rstrip()
 release = version
 
-- 
2.19.2

             reply	other threads:[~2018-12-05 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 14:25 Luca Boccassi [this message]
2018-12-19  2:28 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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=20181205142545.24633-1-bluca@debian.org \
    --to=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).