afrolov / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Failure mode when a script fails is too verbose #77

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here's the output when a subcommand fails.

I think we shouldn't show all the backtrace goop since it obscures the 
command line.

________ running '/usr/bin/python src/tools/gyp/gyp_chromium' in 
'/work/chromium'
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Traceback (most recent call last):
  File "src/tools/gyp/gyp_chromium", line 34, in <module>
    sys.exit(gyp.main(args))
  File "src/tools/gyp/pylib/gyp/__init__.py", line 272, in main
Updating projects from gyp files...
    params)
  File "src/tools/gyp/pylib/gyp/__init__.py", line 76, in Load
    depth, generator_input_info)
  File "src/tools/gyp/pylib/gyp/input.py", line 1721, in Load
    LoadTargetBuildFile(build_file, data, aux_data, variables, includes, 
depth)
  File "src/tools/gyp/pylib/gyp/input.py", line 286, in LoadTargetBuildFile
    includes, depth)
  File "src/tools/gyp/pylib/gyp/input.py", line 286, in LoadTargetBuildFile
    includes, depth)
  File "src/tools/gyp/pylib/gyp/input.py", line 286, in LoadTargetBuildFile
    includes, depth)
  File "src/tools/gyp/pylib/gyp/input.py", line 244, in LoadTargetBuildFile
    build_file_path)
  File "src/tools/gyp/pylib/gyp/input.py", line 732, in 
ProcessVariablesAndConditionsInDict
    build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 748, in 
ProcessVariablesAndConditionsInList
    build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 725, in 
ProcessVariablesAndConditionsInDict
    build_file, key)
  File "src/tools/gyp/pylib/gyp/input.py", line 732, in 
ProcessVariablesAndConditionsInDict
    build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 752, in 
ProcessVariablesAndConditionsInList
    expanded = ExpandVariables(item, is_late, variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 431, in ExpandVariables
    (contents, p.returncode))
Exception: Call to 'pkg-config --cflags gtk+-2.0 gthread-2.0' returned exit 
status 1. while loading dependencies of /work/chromium/src/base/base.gyp 
while loading dependencies of /work/chromium/src/app/app.gyp while loading 
dependencies of /work/chromium/src/build/all.gyp while trying to load 
src/build/all.gyp
failed to run command: /usr/bin/python src/tools/gyp/gyp_chromium

Original issue reported on code.google.com by evan@chromium.org on 11 Sep 2009 at 6:28

GoogleCodeExporter commented 9 years ago
The stack trace is happening due to an explicit "raise Exception" when we 
detect the failed command.  Should be 
pretty simple to do something better.

Original comment by sgk@chromium.org on 21 Oct 2009 at 6:07

GoogleCodeExporter commented 9 years ago
My output is very similar:

god@dx9:~/chromiumos/chromiumos.git/src/scripts$ ./build_chrome.sh --chrome_dir 
../../../../chromium-browser/
Building Chrome in mode Release

________ running '/usr/bin/python src/build/gyp_chromium' in 
'/home/god/chromium-
browser'
Updating projects from gyp files...
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Traceback (most recent call last):
  File "src/build/gyp_chromium", line 79, in <module>
    sys.exit(gyp.main(args))
  File "src/tools/gyp/pylib/gyp/__init__.py", line 423, in main
    params, options.check)
  File "src/tools/gyp/pylib/gyp/__init__.py", line 83, in Load
    depth, generator_input_info, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 2004, in Load
    depth, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 392, in LoadTargetBuildFile
    includes, depth, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 392, in LoadTargetBuildFile
    includes, depth, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 392, in LoadTargetBuildFile
    includes, depth, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 392, in LoadTargetBuildFile
    includes, depth, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 350, in LoadTargetBuildFile
    build_file_path)
  File "src/tools/gyp/pylib/gyp/input.py", line 886, in 
ProcessVariablesAndConditionsInDict
    build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 901, in 
ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 860, in 
ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, is_late, variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 737, in ProcessConditionsInDict
    variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 879, in 
ProcessVariablesAndConditionsInDict
    build_file, key)
  File "src/tools/gyp/pylib/gyp/input.py", line 886, in 
ProcessVariablesAndConditionsInDict
    build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 905, in 
ProcessVariablesAndConditionsInList
    expanded = ExpandVariables(item, is_late, variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 572, in ExpandVariables
    (contents, p.returncode))
Exception: Call to 'pkg-config --cflags gtk+-2.0 gthread-2.0' returned exit 
status 1. 
while loading dependencies of src/base/base.gyp while loading dependencies of 
src/net/net.gyp while loading dependencies of src/app/app.gyp while loading 
dependencies of src/build/all.gyp while trying to load src/build/all.gyp
failed to run command: /usr/bin/python src/build/gyp_chromium

Original comment by GarrettW...@gmail.com on 9 Jan 2010 at 7:28