Purge build dependencies after building package

Bug #1183916 reported by Andrew Starr-Bochicchio
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Auto Package Testing
Fix Released
Undecided
Unassigned
autopkgtest (Ubuntu)
Won't Fix
Wishlist
Adam Gandelman

Bug Description

Adding autopkgtests to bzr-git, I ran into an issue.

I did tested my changes locally using using lp:auto-package-testing.

.bin/run-adt-test -S file:///home/asb/development/pkg-bzr/bzr-git

Log attached...

The tests were successful. After uploading to Debian and syncing to Ubuntu, the test failed due to a dependency problem on Ubuntu's jenkins instance:

https://jenkins.qa.ubuntu.com/view/Saucy/view/AutoPkgTest/job/saucy-adt-bzr-git/1/

 Apparently, if you run it on an unpacked source tree, it builds the package installing all the build dependencies. It then installs the built binary and runs the tests without purging the build dependencies. This is not what I would think the expected result would be. I think it would make sense to purge the build dependencies after building package.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Running into the same issue. I'm trying to spin up fresh cloud instances that include an unpacked source tree. I'd like to catch instances where a dependencies are missing from the packages' Depends, regardless of their existence in Build-Depends. Currently, if the runner has reached the post-build, post-install tests, its usually a sign that the dependency exists in Build-Depends (or the package probably woudln't have built). But at this point, the package has been installed on the system and the functional tests of the package pass even tho the dependency is missing.

Changed in auto-package-testing:
status: New → Confirmed
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Opening a task against autopkgtest as after taking a quick look at the code, auto-package-testing doesn't actually seem to do the building.

As an aside, the naming conventions are a bit confusing. There are run-adt-test and run-adt scripts in auto-package-testing and an adt-run script in autopkgtest. Am I the only one that finds this a bit hard to keep straight?

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Yes, it certainly is confusing. :P

I've thrown up a patch against autopkgtest 2.0.1ubuntu4, I need to rebase against newest version before submitting. It attempts to track new dependencies that are installed during package build time and does a quick attempt at purging them post-build. ATM the purge is pretty naive (just a dpkg -P $PACKAGES), but this fixes the issue for me and fails tests when a package is missing a run-time Depends that happens to be listed as a Build-Depends.

http://bazaar.launchpad.net/~gandelman-a/ubuntu/precise/autopkgtest/purge_build_deps/revision/31

Revision history for this message
Martin Pitt (pitti) wrote :

Seems Adam is working on this, assigning to him.

Changed in autopkgtest (Ubuntu):
assignee: nobody → Adam Gandelman (gandelman-a)
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Robie Basak (racb) wrote :

I think autopkgtest is working as designed. Since run-adt-test uses the adt-virt-null driver, and the adt-virt-null driver doesn't support the "revert" virt driver capability, build dependencies do not get cleaned up. To fix this, run-adt-test should use a proper virt driver that supports "revert" and "revert-full-system".

Cleaning up build dependencies when using virt drivers that do support "revert-full-system" will just waste time, though I don't see it doing any harm. So I'm neutral on Adam's approach, although I think it's just a workaround for problem caused by the consequence of using adt-virt-null in production.

Revision history for this message
Martin Pitt (pitti) wrote :

As Robie already explained, we won't do this with virt-null. virt-lxc has this behaviour for example.

Changed in autopkgtest (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

This was fixed a long time ago. We've been using adt-virt-qemu instead of -null, which does have that behaviour.

Changed in auto-package-testing:
status: Confirmed → Fix Released
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.