get rid of stacktrace when pbuilder fails

Bug #1043253 reported by Martin Mrazik
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PBuilderJenkins
In Progress
High
Unassigned

Bug Description

Errors like the one below are very confusing. The first thing you usually see is a python/pbuilderjenkins stacktrace which makes you immediately think its a pbuilderjenkins error. Only if you have a closer look you realize its a legitimate build failure.

Please catch the exception and log an error message instead.

make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package
W: no hooks of type C found -- ignoring
I: unmounting results filesystem
I: unmounting /var/cache/pbuilder/ccache filesystem
I: unmounting /var/cache/ccache filesystem
I: unmounting dev/pts filesystem
I: unmounting proc filesystem
I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//14027 and its subdirectories
Traceback (most recent call last):
  File "/usr/bin/pbuilderjenkins", line 92, in <module>
    builder.execute_build(hooks=args.hook_list)
  File "/usr/lib/python2.7/dist-packages/pbuilderjenkins/pbuilderjenkins.py", line 321, in execute_build
    self._build(hooks_dir)
  File "/usr/lib/python2.7/dist-packages/pbuilderjenkins/pbuilderjenkins.py", line 287, in _build
    subprocess.check_call(command)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pdebuild', '--', '--inputfile', 'ReportDir', '--bindmounts', 'results', '--basetgz', '/var/cache/pbuilder/precise-amd64.tgz', '--buildresult', 'output', '--hookdir', '/tmp/tmpU6pGsn']' returned non-zero exit status 1
pbuilder returned ERROR.

Related branches

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Yeah, I just left the exceptions after Thomi's review with a TODO to log a bug for proper logging.
thanks!

Changed in pbuilderjenkins:
status: New → Confirmed
assignee: nobody → Sergio Schvezov (sergiusens)
Revision history for this message
Martin Mrazik (mrazik) wrote :

This is yet another stacktrace I would like to see gone soon:

Building tree.
Retrieving 'bzr+ssh://<email address hidden>/~kdub/mir/add_display' to put at 'work'.
Merging 'lp:mir' in to 'work'.
Text conflict in CMakeLists.txt
Text conflict in tests/unit-tests/graphics/CMakeLists.txt
2 conflicts encountered.
bzr: ERROR: Conflicts from merge
DEBUG:pbuilderjenkins:<class 'subprocess.CalledProcessError'>
Traceback (most recent call last):
  File "/usr/bin/pbuilderjenkins", line 92, in <module>
    builder.execute_build(hooks=args.hook_list)
  File "/usr/lib/python2.7/dist-packages/pbuilderjenkins/pbuilderjenkins.py", line 314, in execute_build
    self._branch_setup()
  File "/usr/lib/python2.7/dist-packages/pbuilderjenkins/pbuilderjenkins.py", line 181, in _branch_setup
    bzr_build(recipe_path, self._work_dir)
  File "/usr/lib/python2.7/dist-packages/pbuilderjenkins/pbuilderjenkins.py", line 32, in bzr_build
    subprocess.check_call(['bzr', 'build', recipe, target])
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bzr', 'build', 'trunk.recipe', 'work']' returned non-zero exit status 3

Changed in pbuilderjenkins:
importance: Undecided → High
status: Confirmed → In Progress
Changed in pbuilderjenkins:
assignee: Sergio Schvezov (sergiusens) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.