tags 472543 - moreinfo tags 472543 + patch thanks Okay, I am able to reproduce this bug with pbuilder (didn't use that one before). The problem is twofold:
1. bzr-builddeb needs to Build-Depends and Depends on python-apt as python-debian only Recommends it. 2. the test suite reads the global /etc/apt/sources.list and needs a deb-src line configured there. This cannot be guaranteed. Attached is a log from an intercepted pbuilder session, just after the build failure. I first tried to run the test suite manually, which fails. Then python-apt is installed and the test suite is run again, which gives a nice backtrace. The easiest way around this would probably not running the test suite during build. In this case the attached patch may be interesting. This way the test suite can be run when whished by including "test" or "check" in the DEBBUILDOPTS. I also delete the build-stamps that are created in the build-python% target. I hope this helps, Sebastian
root:~/bzr-builddeb-0.93# BZR_PLUGIN_PATH=/tmp/buildd/bzr-builddeb-0.93/build/lib/bzrlib/plugins python /usr/bin/bzr test-builddeb Unable to load plugin 'builddeb' from '/tmp/buildd/bzr-builddeb-0.93/build/lib/bzrlib/plugins' bzr: ERROR: unknown command "test-builddeb" root:~/bzr-builddeb-0.93# apt-get install python-apt Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: python-apt-dbg The following NEW packages will be installed: python-apt 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/231kB of archives. After this operation, 1778kB of additional disk space will be used. Selecting previously deselected package python-apt. (Reading database ... 14874 files and directories currently installed.) Unpacking python-apt (from .../python-apt_0.7.5_amd64.deb) ... Setting up python-apt (0.7.5) ... root:~/bzr-builddeb-0.93# BZR_PLUGIN_PATH=/tmp/buildd/bzr-builddeb-0.93/build/lib/bzrlib/plugins python /usr/bin/bzr test-builddeb ERROR: bzrlib.plugins.builddeb.tests.test_builder.TestDefaultBuilder.test__find_tarball_no_orig_dir E:You must put some 'source' URIs in your sources.list ====================================================================== ERROR: test__find_tarball_no_orig_dir (bzrlib.plugins.builddeb.tests.test_builder.TestDefaultBuilder) vvvv[log from bzrlib.plugins.builddeb.tests.test_builder.TestDefaultBuilder.test__find_tarball_no_orig_dir] 0.275 created control directory in file:///tmp/testbzr-oMp9OG.tmp/ 0.301 creating repository in file:///tmp/testbzr-oMp9OG.tmp/.bzr/. 0.306 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0xe80690> in file:///tmp/testbzr-oMp9OG.tmp/.bzr/ 0.318 trying to create missing lock '/tmp/testbzr-oMp9OG.tmp/.bzr/checkout/dirstate' 0.318 opening working tree '/tmp/testbzr-oMp9OG.tmp' 0.324 created control directory in file:///tmp/testbzr-oMp9OG.tmp/tmpNqGOO5/work/ 0.327 creating repository in file:///tmp/testbzr-oMp9OG.tmp/tmpNqGOO5/work/.bzr/. 0.330 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x163ad90> in file:///tmp/testbzr-oMp9OG.tmp/tmpNqGOO5/work/.bzr/ 0.339 trying to create missing lock '/tmp/testbzr-oMp9OG.tmp/tmpNqGOO5/work/.bzr/checkout/dirstate' 0.339 opening working tree '/tmp/testbzr-oMp9OG.tmp/tmpNqGOO5/work' INFO Looking for orig/test_0.1.orig.tar.gz to use as upstream source 0.352 opening working tree '/tmp/testbzr-oMp9OG.tmp' ^^^^[log from bzrlib.plugins.builddeb.tests.test_builder.TestDefaultBuilder.test__find_tarball_no_orig_dir] ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/buildd/bzr-builddeb-0.93/build/lib/bzrlib/plugins/builddeb/tests/test_builder.py", line 291, in test__find_tarball_no_orig_dir self.assertRaises(errors.DebianError, builder._find_tarball) File "/usr/lib/python2.5/site-packages/bzrlib/tests/__init__.py", line 960, in assertRaises callableObj(*args, **kwargs) File "/tmp/buildd/bzr-builddeb-0.93/build/lib/bzrlib/plugins/builddeb/builder.py", line 243, in _find_tarball if self._get_upstream_from_archive(): File "/tmp/buildd/bzr-builddeb-0.93/build/lib/bzrlib/plugins/builddeb/builder.py", line 214, in _get_upstream_from_archive sources = apt_pkg.GetPkgSrcRecords() SystemError: E:You must put some 'source' URIs in your sources.list ---------------------------------------------------------------------- Ran 1 test in 0.096s FAILED (errors=1)
diff -ur bzr-builddeb-0.93.orig/debian/control bzr-builddeb-0.93/debian/control --- bzr-builddeb-0.93.orig/debian/control 2008-03-19 23:42:15.000000000 +0100 +++ bzr-builddeb-0.93/debian/control 2008-04-22 23:07:46.000000000 +0200 @@ -4,14 +4,14 @@ Maintainer: Debian Bazaar Maintainers <[EMAIL PROTECTED]> Uploaders: Reinhard Tartler <[EMAIL PROTECTED]>, James Westby <[EMAIL PROTECTED]> Build-Depends: debhelper (>= 5.0.37.2), python-all (>= 2.3.5-11) -Build-Depends-Indep: bzr (>= 1.2~), python-central (>= 0.5.8), python-docutils, python-debian (>= 0.1.4), bzrtools (>= 1.2~), patchutils +Build-Depends-Indep: bzr (>= 1.2~), python-central (>= 0.5.8), python-docutils, python-debian (>= 0.1.4), python-apt, bzrtools (>= 1.2~), patchutils Vcs-Bzr: http://bazaar.launchpad.net/~james-w/bzr-builddeb/trunk XS-Python-Version: >= 2.4 Standards-Version: 3.7.2 Package: bzr-builddeb Architecture: all -Depends: bzr (>= 1.2~), python-debian (>= 0.1.4), ${python:Depends}, dpkg-dev, fakeroot, bzrtools (>= 1.2), devscripts, patchutils +Depends: bzr (>= 1.2~), python-debian (>= 0.1.4), python-apt, ${python:Depends}, dpkg-dev, fakeroot, bzrtools (>= 1.2), devscripts, patchutils Provides: bzr-buildpackage XB-Python-Version: ${python:Versions} Description: bzr plugin for Debian package management diff -ur bzr-builddeb-0.93.orig/debian/rules bzr-builddeb-0.93/debian/rules --- bzr-builddeb-0.93.orig/debian/rules 2008-03-19 23:42:15.000000000 +0100 +++ bzr-builddeb-0.93/debian/rules 2008-04-22 23:33:20.000000000 +0200 @@ -21,17 +21,15 @@ build-python%: python$* setup.py build -ifeq (,$(findstring nocheck,$(DEBBUILDOPTS))) -ifeq (,$(findstring notest,$(DEBBUILDOPTS))) +ifneq (,$(filter test check,$(DEBBUILDOPTS))) BZR_PLUGIN_PATH="$(CURDIR)/build/lib/bzrlib/plugins/" python$* /usr/bin/bzr test-builddeb endif -endif - touch $@ + touch [EMAIL PROTECTED] clean: dh_testdir dh_testroot - rm -f build-stamp install-all-stamp + rm -f build-stamp install-all-stamp build-python*-stamp rm -f $(html_docs) rm -f README.html