merge-upstream fails on packages created with bzr dh-make

Bug #810540 reported by Jonathan Riddell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-builddeb
Fix Released
Medium
Jelmer Vernooij

Bug Description

I created a new package with bzr dh-make then used merge-upstream for a new upstream version and it failed with "bzr: ERROR: must supply file_id or path"

>bzr dh-make libdbusmenu-qt 0.1.0 http://launchpad.net/libdbusmenu-qt/trunk/0.1.0/+download/libdbusmenu-qt-0.1.0.tar.bz2
> cd libdbusmenu-qt
>bzr commit -m "packaging"
>bzr tag
>bzr merge-upstream --version 0.2.0 http://launchpad.net/libdbusmenu-qt/trunk/0.2.0/+download/libdbusmenu-qt-0.2.0.tar.bz2
bzr: ERROR: must supply file_id or path

Related branches

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 810540] [NEW] merge-upstream fails on packages created with bzr dh-make

On Thu, 14 Jul 2011 15:17:27 -0000, Jonathan Riddell <email address hidden> wrote:
> Public bug reported:
>
> I created a new package with bzr dh-make then used merge-upstream for a
> new upstream version and it failed with "bzr: ERROR: must supply file_id
> or path"
>
> >bzr dh-make libdbusmenu-qt 0.1.0 http://launchpad.net/libdbusmenu-qt/trunk/0.1.0/+download/libdbusmenu-qt-0.1.0.tar.bz2
> > cd libdbusmenu-qt
> >bzr commit -m "packaging"
> >bzr tag
> >bzr merge-upstream --version 0.2.0 http://launchpad.net/libdbusmenu-qt/trunk/0.2.0/+download/libdbusmenu-qt-0.2.0.tar.bz2
> bzr: ERROR: must supply file_id or path

Could you run again with "bzr -Derror" to get the traceback, or look in
~/.bzr.log to find the one from the original run?

Thanks,

James

Revision history for this message
Jonathan Riddell (jr) wrote :

jr@gallus:~/src/libdbusmenu-qt/udd-test/libdbusmenu-qt>bzr -Derror merge-upstream --version 0.2.0 http://launchpad.net/libdbusmenu-qt/trunk/0.2.0/+download/libdbusmenu-qt-0.2.0.tar.bz2
Using distribution unstable
bzr: ERROR: bzrlib.errors.BzrError: must supply file_id or path

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 926, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1126, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 713, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/cmds.py", line 656, in run
    contains_upstream_source)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/util.py", line 663, in guess_build_type
    source_format = get_source_format(tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/util.py", line 644, in get_source_format
    return tree.get_file_text(tree.path2id("debian/source/format")).strip()
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree.py", line 528, in get_file_text
    my_file = self.get_file(file_id, path=path, filtered=filtered)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree.py", line 513, in get_file
    return self.get_file_with_stat(file_id, path, filtered=filtered)[0]
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree.py", line 519, in get_file_with_stat
    path = self.id2path(file_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 447, in id2path
    entry = self._get_entry(file_id=file_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 354, in _get_entry
    raise errors.BzrError('must supply file_id or path')
BzrError: must supply file_id or path

Revision history for this message
Jonathan Riddell (jr) wrote :

This happens on a new EC2 machine too so it's not just my computer.

I get the same error after importing a new package with "bzr dh-make" then trying to build it with "bzr builddeb"

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 810540] Re: merge-upstream fails on packages created with bzr dh-make

On Fri, 2011-07-15 at 14:23 +0000, Jonathan Riddell wrote:
> This happens on a new EC2 machine too so it's not just my computer.
>
> I get the same error after importing a new package with "bzr dh-make"
> then trying to build it with "bzr builddeb"
The problem is that debian/source/format is created but not versioned in
bzr - which makes path2id return None for a file_id and subsequent calls
for that file_id barf.

I've attached a branch that fixes the immediate issue in
get_source_format, but I haven't checked whether there are any other
functions in "bzr merge-upstream" that don't work with files that are
present but not versioned.

The root of the issue is likely to be that "bzr dh-make" doesn't version
some of the files created by dh_make.

Cheers,

Jelmer

Jelmer Vernooij (jelmer)
Changed in bzr-builddeb:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 2.7.6
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.