From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 7667E1B144; Wed, 5 Dec 2018 15:26:01 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id t27so19893938wra.6; Wed, 05 Dec 2018 06:26:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lgKxEkwomCgykbmCUgmANuR8UqtLYWqVC54P1TBNyKs=; b=ZgyB2vzOgJZNeotezbQRNZlXznK3fsoK+sKO3OpHnCmP+nKvQFspOKHPG9p0mCxr73 UBLPDuxTzwsvtMT3+4vay1gVerzqwuu8XUMpf/30N8V7WAbjhSOnwStP85yNNX8XKs+2 j6DO6XCNSJH+7/hze9UMSgXYxkGWS+nCSGvMgOPxlav85CogAxQc9EoXK2g3wok94Ser I0/nK8YTmQouskte3Z2w5h+tigBU5QrU5E3UzNN8aLEhqd1ado5LFnguM8dsRs/G4msi VcJqtvESHd7n03iNez4LRDWTDk4eLE9coueTR2BcetV7W+tg0hkjplf1LIhzVTMDasm9 GMhw== X-Gm-Message-State: AA+aEWZgisaqPuzMwjoDX0BUUvLjkWAhM+qCB2YPTn98WgcTCSmp5i3Y KClthyt0mftTtsl0TQ5zXrP0RFqX X-Google-Smtp-Source: AFSGD/Vf0phaWr/Lz4v+oKJ6XpLKF4wfcwqWrUA+mnBF11N8oYpn/GQmhzHjCMxRJGrx9I854tVW7Q== X-Received: by 2002:adf:84e4:: with SMTP id 91mr21794559wrg.237.1544019960598; Wed, 05 Dec 2018 06:26:00 -0800 (PST) Received: from localhost ([2001:1be0:110d:fcfe:d920:cbaa:8666:72af]) by smtp.gmail.com with ESMTPSA id o4sm9807301wmh.40.2018.12.05.06.25.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 06:25:59 -0800 (PST) From: Luca Boccassi To: dev@dpdk.org Cc: john.mcnamara@intel.com, thomas@monjalon.net, marko.kovacevic@intel.com, Luca Boccassi , stable@dpdk.org Date: Wed, 5 Dec 2018 14:25:45 +0000 Message-Id: <20181205142545.24633-1-bluca@debian.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] doc: fix garbage text in generated HTML guides X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 14:26:01 -0000 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: FAQ — Data Plane Development Kit make[2]: Entering directory '/build/1st/dpdk-18.11/doc/guides' 18.11.0 make[2]: Leaving directory '/build/1st/dpdk-18.11' documentation 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 --- 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