Debian imports crash on non-UTF-8 filenames
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Colin Watson |
Bug Description
The Debian importer recently started crashing like this:
2021-03-01 16:27:08 ERROR Unhandled exception
Traceback (most recent call last):
File "/srv/debian-
return func(self, *args, **kw)
File "/srv/debian-
self.
File "/srv/debian-
return func(self, *args, **kw)
File "/srv/debian-
self.main()
File "/srv/debian-
run_
File "/srv/debian-
import_
File "/srv/debian-
distro, source, package_root, importer_handler)
File "/srv/debian-
distro, source, package_root, importer_handler)
File "/srv/debian-
source_
File "/srv/debian-
self.
File "/srv/debian-
archive_root)
File "/srv/debian-
shutil.
File "/usr/lib/
fullname = os.path.join(path, name)
File "/usr/lib/
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 1: ordinal not in range(128)
2021-03-01 16:27:08 INFO OOPS-c56cc0966e277b161de975f9c778a41e
This is due to a combination of two changes:
* https:/
* https:/
This combination triggered https:/
$ dpkg-source -x aspell-
$ python2 -c 'import shutil; shutil.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
fullname = os.path.join(path, name)
File "/usr/lib/
path += '/' + b
UnicodeDecode
To avoid this Python 2 bug, we'll need to make sure that the string we pass to shutil.rmtree is a str object, not a unicode object.
Related branches
- Ioana Lasc (community): Approve
-
Diff: 85 lines (+26/-6)3 files modifiedlib/lp/services/tarfile_helpers.py (+2/-2)
lib/lp/soyuz/scripts/gina/packages.py (+6/-2)
lib/lp/soyuz/scripts/tests/test_gina.py (+18/-2)
summary: |
- Debian imports crash on non-ASCII filenames + Debian imports crash on non-UTF-8 filenames |
Changed in launchpad: | |
status: | In Progress → Fix Committed |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |