unicode name support broken, breaks etckeeper: bzrlib.errors.InvalidEntryName: Invalid entry name: snap-gnome\x2d3\x2d28\x2d1804-110.mount

Bug #1858963 reported by peter swain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

Not sure whether this is properly a bug in
- bzr, for failing to handle names legal to filesystem
- etckeeper, for failing to wrap names known to be unusable by one of its version-control engines
- webkit, for daring to use filenames which break some tools
but I'm going with the bzr, fixing the issue at the level which avoids a larger class of problem

I don't use bzr, except for etckeeper, which installed it years ago as its default engine

On Ubuntu-19.10, I was adding packages with
  sudo apt install libwebkit2gtk-4.0-{37,dev,doc}
which invoked etckeeper to log the changes, leading to ...

bzr: ERROR: bzrlib.errors.InvalidEntryName: Invalid entry name: snap-gnome\x2d3\x2d28\x2d1804-110.mount

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, 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/builtins.py", line 842, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 453, in smart_add
    adder.add(file_list, recurse=recurse)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 764, in add
    inv_path)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 628, in _add_one_and_parent
    file_id=file_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 2234, in make_entry
    return factory(file_id, name, parent_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 422, in __init__
    super(InventoryFile, self).__init__(file_id, name, parent_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 222, in __init__
    raise errors.InvalidEntryName(name=name)
InvalidEntryName: Invalid entry name: snap-gnome\x2d3\x2d28\x2d1804-110.mount

bzr 2.8.0dev1 on python 2.7.16 (Linux-5.0.0-38-generic-x86_64-with-
    Ubuntu-19.04-disco)
arguments: ['/usr/bin/bzr', 'add', '-q', '.']
plugins: bash_completion[2.8.0dev1], builddeb[2.8.6], bzrtools[2.6.0],
    changelog_merge[2.8.0dev1], etckeeper[unknown], grep[2.8.0dev1],
    launchpad[2.8.0dev1], netrc_credential_store[2.8.0dev1],
    news_merge[2.8.0dev1], po_merge[2.8.0dev1], weave_fmt[2.8.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

*** 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.
etckeeper warning: bzr add failed
Committing to: /etc/
modified cups/printers.conf
Committed revision 2295.
Selecting previously unselected package libpsl-dev:amd64.
(Reading database ... 609849 files and directories currently installed.)
Preparing to unpack .../libpsl-dev_0.20.2-2_amd64.deb ...
Unpacking libpsl-dev:amd64 (0.20.2-2) ...
Selecting previously unselected package libsoup2.4-dev:amd64.
Preparing to unpack .../libsoup2.4-dev_2.66.1-1ubuntu0.1_amd64.deb ...
Unpacking libsoup2.4-dev:amd64 (2.66.1-1ubuntu0.1) ...
Selecting previously unselected package libjavascriptcoregtk-4.0-dev:amd64.
Preparing to unpack .../libjavascriptcoregtk-4.0-dev_2.26.2-0ubuntu0.19.04.1_amd64.deb ...
Unpacking libjavascriptcoregtk-4.0-dev:amd64 (2.26.2-0ubuntu0.19.04.1) ...
Selecting previously unselected package libwebkit2gtk-4.0-dev:amd64.
Preparing to unpack .../libwebkit2gtk-4.0-dev_2.26.2-0ubuntu0.19.04.1_amd64.deb ...
Unpacking libwebkit2gtk-4.0-dev:amd64 (2.26.2-0ubuntu0.19.04.1) ...
Selecting previously unselected package libwebkit2gtk-4.0-doc.
Preparing to unpack .../libwebkit2gtk-4.0-doc_2.26.2-0ubuntu0.19.04.1_all.deb ...
Unpacking libwebkit2gtk-4.0-doc (2.26.2-0ubuntu0.19.04.1) ...
Setting up libjavascriptcoregtk-4.0-dev:amd64 (2.26.2-0ubuntu0.19.04.1) ...
Setting up libpsl-dev:amd64 (0.20.2-2) ...
Setting up libwebkit2gtk-4.0-doc (2.26.2-0ubuntu0.19.04.1) ...
Setting up libsoup2.4-dev:amd64 (2.66.1-1ubuntu0.1) ...
Setting up libwebkit2gtk-4.0-dev:amd64 (2.26.2-0ubuntu0.19.04.1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for doc-base (0.10.8) ...
Processing 3 added doc-base files...
bzr: ERROR: bzrlib.errors.InvalidEntryName: Invalid entry name: snap-gnome\x2d3\x2d28\x2d1804-110.mount

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, 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/builtins.py", line 842, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 453, in smart_add
    adder.add(file_list, recurse=recurse)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 764, in add
    inv_path)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 628, in _add_one_and_parent
    file_id=file_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 2234, in make_entry
    return factory(file_id, name, parent_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 422, in __init__
    super(InventoryFile, self).__init__(file_id, name, parent_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", line 222, in __init__
    raise errors.InvalidEntryName(name=name)
InvalidEntryName: Invalid entry name: snap-gnome\x2d3\x2d28\x2d1804-110.mount

bzr 2.8.0dev1 on python 2.7.16 (Linux-5.0.0-38-generic-x86_64-with-
    Ubuntu-19.04-disco)
arguments: ['/usr/bin/bzr', 'add', '-q', '.']
plugins: bash_completion[2.8.0dev1], builddeb[2.8.6], bzrtools[2.6.0],
    changelog_merge[2.8.0dev1], etckeeper[unknown], grep[2.8.0dev1],
    launchpad[2.8.0dev1], netrc_credential_store[2.8.0dev1],
    news_merge[2.8.0dev1], po_merge[2.8.0dev1], weave_fmt[2.8.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

*** 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.
etckeeper warning: bzr add failed

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.