If the repository has filenames with non-ascii characters and the locale is set to a non-matching locale "bzr export" fails with the following error: -----------LOG------------ * exporting ... bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 86: ordinal not in range(128) Traceback (most recent call last): File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code return the_callable(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr ret = run(*run_argv) File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases return self.run(**all_cmd_args) File "/usr/lib64/python2.6/site-packages/bzrlib/builtins.py", line 2744, in run export(rev_tree, dest, format, root, subdir, filtered=filters) File "/usr/lib64/python2.6/site-packages/bzrlib/export/__init__.py", line 102, in export return _exporters[format](tree, dest, root, subdir, filtered=filtered) File "/usr/lib64/python2.6/site-packages/bzrlib/export/__init__.py", line 61, in _loader return func(tree, dest, root, subdir, filtered=filtered) File "/usr/lib64/python2.6/site-packages/bzrlib/export/dir_exporter.py", line 67, in dir_exporter osutils.pumpfile(fileobj, file(fullpath, 'wb')) UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 86: ordinal not in range(128) bzr 2.0.0 on python 2.6.2 (Linux-2.6.30-zen1-x86_64-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-1.12.11.1) arguments: ['/usr/bin/bzr', 'export', '/var/tmp/paludis/games-strategy-s25rttr-9999/work/s25rttr-9999'] encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None plugins: launchpad /usr/lib64/python2.6/site-packages/bzrlib/plugins/launchpad [2.0.0] netrc_credential_store /usr/lib64/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.0.0] *** Bazaar has encountered an internal error. This probably indicates a bug in Bazaar. You can help us fix it by filing a bug report at https://bugs.launchpad.net/bzr/+filebug including this traceback and a description of the problem. !!! ERROR in games-strategy/s25rttr-9999::mereandor: !!! In bzr_fetch at line 893 !!! bzr.eclass: export failed !!! Call stack: !!! * bzr_fetch (/var/tmp/paludis/games-strategy-s25rttr-9999/temp/loadsaveenv:893) !!! * bzr_src_unpack (/var/tmp/paludis/games-strategy-s25rttr-9999/temp/loadsaveenv:922) !!! * src_unpack (/var/tmp/paludis/games-strategy-s25rttr-9999/temp/loadsaveenv:4203) !!! * ebuild_f_unpack (/usr/libexec/paludis/2/src_unpack.bash:47) !!! * ebuild_main (/usr/libexec/paludis/ebuild.bash:598) !!! * main (/usr/libexec/paludis/ebuild.bash:626) diefunc: making ebuild PID 30514 exit with error die trap: exiting with error. -----------LOG------------ This is bzr-2.0.0 but the same error was encountered with 1.15 and 1.18. A workaround is to explicitly call bzr_src_unpack like this: function src_unpack() { LC_ALL="$(locale -a | grep utf8 | head -n1)" bzr_src_unpack } Reproducible: Always Steps to Reproduce:
Created attachment 205657 [details] (games-strategy/s25rttr-9999.ebuild) example for an ebuild that fails
This is an upstream bug: https://bugs.launchpad.net/bzr/+bug/413406
We won't fix it, so please wait for the upstream fix.