Recipe builds fail with bzr: ERROR: No module named apt_pkg

Bug #890834 reported by Scott Ritchie
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
launchpad-buildd
Fix Released
Critical
Martin Pool

Bug Description

As of today, with the new version of the recipe build system that supports {latest-tag}, my builds started failing with the error:

bzr: ERROR: No module named apt_pkg
You may need to install this Python library separately.

Example buildlog here: https://launchpadlibrarian.net/85208307/buildlog.txt.gz

This is probably due to a missing python-apt package on the build daemons.

Tags: regression

Related branches

Brad Crittenden (bac)
Changed in launchpad:
status: New → Triaged
importance: Undecided → Critical
William Grant (wgrant)
affects: launchpad → launchpad-buildd
tags: added: regression
Revision history for this message
Martin Pool (mbp) wrote :

I think the dependency really ought to be in bzr-builder as that's most directly calling it.

See also bug 890892 which would have made this easier to understand.

So, really this is a python-debian bug, that it imports apt_pkg unconditionally, while only having a Recommends dependency on it. On the builds, installation of Recommends is turned off. That is still present in lucid, but fixed in oneiric.

It's probably easiest just to work around it by declaring the dependency in either launchpad-buildd or bzr-builder.

affects: launchpad-buildd → bzr-builder
Changed in bzr-builder:
assignee: nobody → Martin Pool (mbp)
status: Triaged → In Progress
Martin Pool (mbp)
affects: bzr-builder → launchpad-buildd
Revision history for this message
Martin Pool (mbp) wrote :

I added a dependency to launchpad-buildd and it is building in <https://code.launchpad.net/~launchpad/+recipe/launchpad-buildd-daily> and then will be deployed.

Changed in launchpad-buildd:
status: In Progress → Fix Committed
Revision history for this message
Martin Pool (mbp) wrote :

hloeung deployed this to a staging buildd and it apparently worked <https://code.staging.launchpad.net/~jelmer/+archive/ppa/+recipebuild/87828>; it will be rolled out more broadly soon.

Revision history for this message
Martin Pool (mbp) wrote :

still waiting for deployment of the dependency addition, but I think python-apt has actually been deployed

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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