UnicodeDecodeError in gather_orig_files with filename not in locale encoding

Bug #865753 reported by Jelmer Vernooij
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr-builddeb
Fix Released
High
Jelmer Vernooij
bzr-builddeb (Debian)
Fix Released
Unknown
bzr-builddeb (Ubuntu)
Fix Released
High
Jelmer Vernooij

Bug Description

Imported from Debian bug http://bugs.debian.org/644178:

Package: bzr-builddeb
Version: 2.7.9
Severity: important

Dear Maintainer,

When running "bzr builddeb" it raised a UnicodeDecodeError and failed
to build anything. Using Squeeze version (2.7.9) of bzr-builddeb on
same project resulted in no crash. Full log attached.

/Björn

-- System Information:
Debian Release: wheezy/sid
   APT prefers oldstable
   APT policy: (500, 'oldstable'), (500, 'unstable'), (50,
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bzr-builddeb depends on:
ii bzr 2.4.1-1
ii devscripts 2.11.1
ii dpkg-dev 1.16.1
ii fakeroot 1.18.1-1
ii patchutils 0.3.2-1
ii pristine-tar 1.14
ii python 2.7.2-7
ii python-apt 0.8.0
ii python-debian 0.1.21
ii python2.6 2.6.7-4
ii python2.7 2.7.2-5

Versions of packages bzr-builddeb recommends:
ii libalgorithm-merge-perl 0.08-2
ii python-launchpadlib 1.9.9-2

Versions of packages bzr-builddeb suggests:
pn bzr-svn <none>
pn python-lzma <none>

-- no debconf information

Tags: regression

Related branches

Jelmer Vernooij (jelmer)
Changed in bzr-builddeb (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in bzr-builddeb:
status: New → Triaged
importance: Undecided → High
Changed in bzr-builddeb (Debian):
importance: Undecided → Unknown
Changed in bzr-builddeb (Debian):
status: New → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

Same basic problem as bug 826421 - filenames are expected to be decodable using the current locale.

Traceback from downstream attachment:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 721, 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 427, in run
    builder.export()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/builder.py", line 75, 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 104, in _distill
    self.upstream_provider.provide(parent_dir)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/upstream/__init__.py", line 433, in provide
    if self.already_exists_in_store() is None:
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/upstream/__init__.py", line 454, in already_exists_in_store
    return gather_orig_files(self.package, self.version, self.store_dir)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/upstream/__init__.py", line 377, in gather_orig_files
    if filename.startswith(prefix):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 1: ordinal not in range(128)

Jelmer Vernooij (jelmer)
Changed in bzr-builddeb:
status: Triaged → In Progress
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 2.8
Martin Packman (gz)
tags: added: regression
summary: - bzr-builddeb: UnicodeDecodeError
+ UnicodeDecodeError in gather_orig_files with filename not in locale
+ encoding
Jelmer Vernooij (jelmer)
Changed in bzr-builddeb:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-builddeb:
status: Fix Committed → Fix Released
Changed in bzr-builddeb (Ubuntu):
assignee: nobody → Jelmer Vernooij (jelmer)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  [ Jonathan Riddell ]
  * Add get-orig-source command which will get the upstream tar file.
    LP: #862188
  * Change "bd-do" command to "builddeb-do" and alias "bd-do".
  * Add commit-message-from-changelog option for those who do not
    want commit message set automatically

  [ Jelmer Vernooij ]
  * Support importing and building packages with multiple upstream
    tarballs. LP: #653757, LP: #664834
  * Move .bzr-builddeb/default.conf to debian/bzr-builddeb.conf.
    LP: #793137
  * Fix test suite on Lucid, where dpkg-mergechangelogs is not available.

  [ Martin Packman ]
  * Fix test_utf8_changelog when run with older versions of python-debian.

  [ Jelmer Vernooij ]
  * Support svn-buildpackage tag names to find upstream versions.
    LP: #874263
  * Support --revision argument to merge-package. LP: #888590
  * By default, don't override the commit message from debian/changelog
    unless 'commit-message-from-changelog' is explicitly set to True. LP: #812749
  * Support running dep3-patch against remote repositories, and with
    open-ended revision ranges. LP: #893608
  * Fix finding orig tarballs in directories also containing filenames
    with non-utf8 characters. LP: #865753
  * bzr-builddeb now prefers the 'get-packaged-orig-source' rule to
    retrieve the packaged upstream source, and warns about
    'get-orig-source'. LP: #409862
  * Support translations.

  [ Martin Packman ]
  * Deal with invalid versions and bad encoding in the changelog merge
    hook. LP: #893495

 -- Jelmer Vernooij <email address hidden> Fri, 16 Dec 2011 19:58:57 +0100

Changed in bzr-builddeb (Ubuntu):
status: In Progress → Fix Released
Changed in bzr-builddeb (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.