Packaging build broken: no file to patch

Bug #1052805 reported by Jeroen T. Vermeulen
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Julian Edwards

Bug Description

Attempts to build the package using “bzr builddep” break.

First there's an error “dh: Unknown sequence get-packaged-orig-source (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)” — but this doesn't seem to be the main problem. Then, quilt tries to apply our patches and fails on the first one, saying that there is no file to patch. The file is definitely present in the branch though, and seemingly unchanged.

The problem starts at revision 82 of the packaging branch, which introduced tests:

Related branches

Revision history for this message
Scott Moser (smoser) wrote :

I'm not exactly sure why bzr debuild fails, but I noticed his in and tried to fix it. Unfortunately, while that was valid and buildable package, it exposed a bug in 'bzr dailydeb' (which is how the dailiy builds run). I reverted my change (and thus knowingly re-broke bzr bd again) at revno 87.

Here is a summary of whats wrong:
 * The tests/ files that were added should not be in the packaging branch.
    Its bad packaging to have files outside debian/ in your packaging. And most of the time people enforce that by using 'debuild' with '--source-option=--abort-on-upstream-changes'.
 * When I removed these files, and instead put them into a patch to be applied, that broke bzr dailydeb because we were creating new files with a patch (which seems like a major bug, but this was verified by jelmer).

I think the right solution is probably to move those tests/ files into debian/tests and then work with them from there.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The appearance of the 'tests' directory throws off the heuristics in bzr-builddeb that make it assume the package is a merge or native package.

I've attached a branch that fixes this.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The attached branch might fix this issue, it does still mean (as Scott said) that the build fails because there are files in the tree that are not the upstream source and not added by debian/patches.

make[1]: Leaving directory `/tmp/build-area/maas-0.1+bzr1002+dfsg'
   dh_clean -O--buildsystem=python_distutils
 dpkg-source -b maas-0.1+bzr1002+dfsg
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building maas using existing ./maas_0.1+bzr1002+dfsg.orig.tar.gz
dpkg-source: info: local changes detected, the modified files are:
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/maas_0.1+bzr1002+dfsg-0ubuntu3.diff.qF7ZCE
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-buildpackage: error: dpkg-source -b maas-0.1+bzr1002+dfsg gave error exit status 2
debuild: fatal error at line 1357:
dpkg-buildpackage -rfakeroot -D -us

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Either the tests should be a part of upstream (if they're not specific to the debian package), or they should live in debian/tests rather than ./tests.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

This diff fixes it for me:

=== renamed file 'tests/' => 'debian/tests/'
=== modified file 'debian/tests/maas-package-test'
--- debian/tests/maas-package-test 2012-09-10 19:28:15 +0000
+++ debian/tests/maas-package-test 2012-09-20 02:17:53 +0000
@@ -2,4 +2,4 @@
 set -e -u
 exec 2>&1
 pip install sst
-nosetests tests/
+nosetests debian/tests/

=== removed directory 'tests'

Changed in maas:
assignee: nobody → Julian Edwards (julian-edwards)
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers