dh-make and merge-upstream choke on orig.tar.bz2 imports

Bug #616786 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-builddeb (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: bzr-builddeb

I tried to do a package from scratch where upstream releases bz2 tarballs. This doesn't seem to work:

First, create a test bz2 (happens with any other tarball as well, though):

mkdir /tmp/test; cd /tmp/test
echo hello > readme.txt
tar cjf foo_1.orig.tar.bz2 readme.txt
rm readme.txt

Now try to bzrify it:

$ bzr dh-make --bzr-only --v3 -Derror foo 1 foo_1.orig.tar.bz2
Fetching tarball
bzr: ERROR: bzrlib.errors.FileExists: File exists: 'foo_1.orig.tar.bz2'

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1111, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 704, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb/cmds.py", line 974, in run
    version.encode("utf-8"), use_v3=v3)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb/dh_make.py", line 90, in import_upstream
    package_name, version, use_v3=use_v3)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb/dh_make.py", line 73, in _get_tarball
    force_gz=not use_v3)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb/repack_tarball.py", line 229, in repack_tarball
    _error_if_exists(target_transport, new_name, source_name)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb/repack_tarball.py", line 145, in _error_if_exists
    raise FileExists(new_name)
FileExists: File exists: 'foo_1.orig.tar.bz2'

The same happens if I try to merge-upstream in an already existing packaging directory.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: bzr-builddeb 2.4.2
ProcVersionSignature: Ubuntu 2.6.35-14.20-generic 2.6.35
Uname: Linux 2.6.35-14-generic x86_64
Architecture: amd64
Date: Thu Aug 12 14:57:59 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: bzr-builddeb

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
James Westby (james-w) wrote :

Hi,

Found the problem. Should be fixed in the next upload.

As a workaround, you can just not put the tarball that you want to use in the location
that the command wants to put it in. It will be wasteful, but should avoid this error.

Thanks,

James

Changed in bzr-builddeb (Ubuntu):
status: New → Fix Committed
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bzr-builddeb - 2.6

---------------
bzr-builddeb (2.6) unstable; urgency=low

  [ James Westby ]

  * Don't fail if asked to use a .bz2 tarball that is already in the desired
    location. LP: #616786
  * Don't crash if we are asked to merge-upstream with an unrelated branch.
    LP: #619614.
  * Don't strip -n from the version we get in merge-upstream, as some
    upstreams have this in there, and trying to support both means supporting
    both badly. If you are used to doing "bzr merge-upstream --version
    <package version>" then it will no longer work for you, use the
    upstream version instead.
  * Don't crash when doing merge-upstream with a branch that does a rename
    and then ships another file with the old path in the tarball that isn't
    in the branch.

  [ Jelmer Vernooij ]

  * Fix the auto-detection of merge mode.
  * Don't crash on merge mode packages where there is no export-upstream
    if we can't find the tarball.
  * Determine Bazaar home directory using bzrlib to prevent test
    isolation issues. LP: #614125
 -- James Westby <email address hidden> Tue, 14 Sep 2010 19:08:07 +0000

Changed in bzr-builddeb (Ubuntu):
status: Fix Committed → 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.