[oe-commits] [openembedded-core] 01/02: lib/oe/utils: Set stderr for host_gcc_version()

git at git.openembedded.org git at git.openembedded.org
Thu Dec 13 10:44:23 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2c8d632469e274711ab9ad4df7c6c1ae93ffce3d
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Thu Dec 13 11:19:28 2018 +0800

    lib/oe/utils: Set stderr for host_gcc_version()
    
    Fixed:
    $ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc
    $ rm -fr tmp/hosttools/ && bitbake -p
    [snip]
    ERROR: Error running gcc  --version:
    
    It didn't print the error message, now it is:
    ERROR: Error running gcc  --version: ccache: error: Could not find compiler "gcc" in PATH
    
    For the error itself, it is because ccache is not in my HOSTTOOLS, so this is
    an expected error.
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8a584d6..29b4115 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -366,7 +366,8 @@ def host_gcc_version(d, taskcontextonly=False):
     try:
         env = os.environ.copy()
         env["PATH"] = d.getVar("PATH")
-        output = subprocess.check_output("%s --version" % compiler, shell=True, env=env).decode("utf-8")
+        output = subprocess.check_output("%s --version" % compiler, \
+                    shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
     except subprocess.CalledProcessError as e:
         bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list