Build problem after `bzr merge`ing source packages

Bug #929164 reported by Barry Warsaw
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
Confirmed
Undecided
Unassigned
brz-debian
Triaged
Medium
Unassigned
bzr-builddeb
Triaged
Medium
Unassigned

Bug Description

$ bzr init-repo sphinx
$ cd sphinx
$ bzr branch ubuntu:sphinx precise
$ bzr branch debianlp:sid/sphinx sid
$ cd precise
$ bzr merge ../sid

This will result in conflicts for debian/control and debian/rules. Resolve them in favor of using dh_python2, although I think the details of the resolution aren't important for the purposes of this bug. Then...

$ bzr bd -S
Building using working tree
Building package in normal mode
Looking for a way to retrieve the upstream tarball
Upstream tarball already exists in build directory, using that
bzr: ERROR: [Errno 2] No such file or directory: '/home/barry/projects/ubuntu/sphinx/precise/.pc/applied-patches'

Look carefully at the bzr stat output and you'll see that the .pc directory got removed. Reverting the changes to .pc doesn't help as they will show up as local changes. I'll try to use the new quilt merge options to see if I can get something to work.

Revision history for this message
Barry Warsaw (barry) wrote :

Nope, as far as I can tell, neither of the debian/bzr-builddeb.conf options help avoid the problem.

I'm going to go ahead and syncpackage sphinx to unblock us, but you should be able to grab the earlier revision to test things out.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 929164] Re: Build problem after `bzr merge`ing source packages

Could you please post the traceback for the 'no such file' error?

Revision history for this message
Barry Warsaw (barry) wrote :

From ~/.bzr.log (afaict)

0.130 Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 919, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1124, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 672, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 694, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/cmds.py", line 446, in run
    builder.export()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/builder.py", line 77, in export
    self.distiller.distill(self.target_dir)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/source_distiller.py", line 79, in distill
    self._distill(target)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/source_distiller.py", line 106, in _distill
    self._prepare_working_tree()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/source_distiller.py", line 87, in _prepare_working_tree
    ie._read_tree_state(dp, self.tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 484, in _read_tree_state
    self.executable = work_tree.is_executable(self.file_id, path=path)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 498, in is_executable
    mode = osutils.lstat(self.abspath(path)).st_mode
OSError: [Errno 2] No such file or directory: '/home/barry/projects/ubuntu/sphinx/precise/.pc/applied-patches'

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

Does running "bzr rm" (no arguments) help?

Revision history for this message
Barry Warsaw (barry) wrote :

On Feb 09, 2012, at 09:38 PM, Jelmer Vernooij wrote:

>Does running "bzr rm" (no arguments) help?

I fail at getting the source package back to a state before the syncrequest to
try the merge again. :(

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This happened to me as well while trying to merge cyrus-sasl2. Same basic problem.. bzr reported the 'Versions' file missing.

Changed in udd:
status: New → Confirmed
Revision history for this message
Barry Warsaw (barry) wrote :

Clint hit a similar problem with cyrus-sasl2, and I confirmed that the same bzr bd -S bug hits that package after the merge. The common theme here is that both had conflicts which had to be resolved manually.

I've confirmed that `bzr rm` with no arguments solves the bzr bd -S problem. Why is that and is there anything we can do to avoid having to run bzr rm?

Revision history for this message
Barry Warsaw (barry) wrote :

Note too that while you can build the source package now, the quilt patches are all unapplied. If you `quilt push -a && bzr commit -m'blah'` you then hit another problem during bzr bd -S:

% bzr bd -S
Building using working tree
Building package in normal mode
Looking for a way to retrieve the upstream tarball
Upstream tarball already exists in build directory, using that
bzr: ERROR: An error (1) occurred running quilt:

Applying patch 0001_versioned_symbols.diff
patching file lib/Makefile.am
Hunk #1 FAILED at 62.
1 out of 1 hunk FAILED -- rejects in file lib/Makefile.am
patching file Versions
Patch 0001_versioned_symbols.diff does not apply (enforce with -f)

`quilt applied/unapplied` does show that all patches are applied.

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

We need to make sure to explicitly remove those files in the working tree inventory, after the quilt patches have been applied.

This should be fairly easy to do I think.

Changed in bzr-builddeb:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Download full text (5.9 KiB)

20:34 < SpamapS> where exactly can I set this 'quilt-commit-policy' ?
20:34 < SpamapS> There's no docs for it..
20:34 * SpamapS should perhaps ask jelmer
20:34 < SpamapS> jelmer: here?
20:34 -!- torkel [<email address hidden>] has joined #ubuntu-devel
20:34 < barry> SpamapS: yeah, i did find them, but i forget where
20:34 < barry> you add them to debian/bzr-builddeb.conf which is an ini file iirc
20:35 < jelmer> SpamapS: hi
20:35 < SpamapS> jelmer: I'm trying to figure out how to set the quilt-commit-policy = applied
20:35 < barry> hi jelmer! more data on bug 929164
20:35 < ubottu> Launchpad bug 929164 in Ubuntu Distributed Development "Build problem after `bzr merge`ing source packages" [Undecided,Confirmed] https://launchpad.net/bugs/929164
20:37 < SpamapS> seems to me that the policy should be inferred from debian/source/format , shouldn't it?
20:37 -!- ia [~ia@89.169.161.244] has joined #ubuntu-devel
20:37 -!- asac [~asac@conference/linaro-connect/x-kuimhjzxbdouyzwb] has joined #ubuntu-devel
20:37 -!- asac [~asac@conference/linaro-connect/x-kuimhjzxbdouyzwb] has quit [Changing host]
20:37 -!- asac [~asac@debian/developer/asac] has joined #ubuntu-devel
20:38 < jelmer> SpamapS: what are you trying to do exactly?
20:38 < jelmer> SpamapS: quilt-commit-policy by default is disabled
20:39 -!- amorphous [~<email address hidden>] has joined #ubuntu-devel
20:39 -!- amorphous [~<email address hidden>] has left #ubuntu-devel []
20:39 < SpamapS> jelmer: I want patches applied to a branch when I commit
20:40 < jelmer> SpamapS: ah, ok - in that case you want 'echo [BUILDDEB]\nquilt-commit-policy = applied\n' > debian/bzr-builddeb.conf
20:40 < SpamapS> jelmer: mostly for the greater purpose of testing why merging lp:debian/cyrus-sasl2 into lp:ubuntu/cyrus-sasl2 ends up deleting the entire .pc directory
20:41 < jelmer> SpamapS: that would probably be because the smart quilt merging kicks in - it unapplies patches during the merge
20:41 -!- dupondje [~<email address hidden>] has joined #ubuntu-devel
20:42 < barry> SpamapS here's where jelmer describes configuration: http://article.gmane.org/gmane.linux.ubuntu.devel/34747
20:43 < barry> jelmer: and when there's conflicts the patches don't get applied because the process stops, which makes sense
20:43 < dupondje> Somebody here around with some gdebi/apt knowledge? Got a weird issue with a package, depends are mysql-client-5.1 | mysql-client, but get the following error on install (gdebi: http://paste.ubuntu.com/840803/ or apt
                  http://paste.ubuntu.com/840800/ )
20:43 -!- malkauns [~neil@67.115.118.49] has quit [Read error: Connection reset by peer]
20:43 -!- victorp [~victorp@02dc7c4e.bb.sky.com] has quit [Quit: Ex-Chat]
20:44 -!- malkauns [~neil@67.115.118.49] has joined #ubuntu-devel
20:44 < jelmer> SpamapS, barry: also http://bazaar.launchpad.net/~bzr-builddeb-hackers/bzr-builddeb/trunk/view/head:/doc/user_manual/configuration.rst
20:45 < barry> jelmer: thanks, i'll add a link to that from the packaging guide
20:45 -!- malkauns [~neil@67.115.118.49] has quit [Read error: Connection reset by peer]
20:46 -!- malkauns [~neil@67.115...

Read more...

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I've pushed up the offending branches as +junk branches so they will stay frozen in time:

lp:~clint-fewbar/+junk/cyrus-sasl2-builddeb
lp:~clint-fewbar/+junk/debian-curys-sasl2-builddeb

Merging the debian into the non-debian one results in the bug manifesting. To progress from there I did this:

<manually resolve conflicts>
bzr resolved
bzr rm
quilt push -a
bzr add
debcommit

That resulted in a packaging branch that was in the "applied" state, and builds properly with bzr bd.

The cyrus-sasl2 package will be synced now, so the best way to continue reproducing the problem will be those two junk branches.

Jelmer Vernooij (jelmer)
Changed in bzr-builddeb:
assignee: Jelmer Vernooij (jelmer) → nobody
Jelmer Vernooij (jelmer)
Changed in brz-debian:
status: New → Triaged
importance: Undecided → Medium
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.