bzr: ERROR: exceptions.KeyError: 'Source' when building recipe on launchpad

Bug #1131169 reported by Phil Frost
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

This is very similar to ​ #1030822, except in that bug the Source field was missing from debian/control, while in my case it was present but I think not correctly parsed. Here's my failed build log:

relevant traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 699, in run_argv_aliases
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/builder/", line 653, in run
    package = debian_source_package_name(control_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/builder/", line 499, in debian_source_package_name
    return control["Source"].encode("ascii")
  File "/var/lib/python-support/python2.5/debian_bundle/", line 95, in __getitem__
    return self.__dict[key]
KeyError: 'Source'

the control file as it was for this failure:

and my workaround:

My local version of bzr-builder didn't have any issue parsing debian/control with the comments, and it's probably a safe assumption that the debian and ubuntu builders for released packages do not either, since I derived this packaging from those official sources. So, perhaps something specific to the launchpad environment, or the version of bzr-builder there?

William Grant (wgrant)
affects: bzr-builder → launchpad-buildd
Changed in launchpad-buildd:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers