Package: lintian-brush
Version: 0.13.1
Severity: normal
Dear Maintainer,
I tried to run lintian-brush in the default Docker image (debian:latest
from the Docker Hub library, which is a Buster image). I installed git
and lintian-brush from apt, checked out a package, and received the
following error:
# lintian-brush
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/breezy/ignores.py", line 93, in
get_user_ignores
f = open(path, 'rb')
FileNotFoundError: [Errno 2] No such file or directory:
'/root/.config/breezy/ignore'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/lintian-brush", line 11, in <module>
load_entry_point('lintian-brush==0.13.1', 'console_scripts',
'lintian-brush')()
File "/usr/lib/python3/dist-packages/lintian_brush/__main__.py", line 153, in
main
verbose=args.verbose)
File "/usr/lib/python3/dist-packages/lintian_brush/__init__.py", line 456, in
run_lintian_fixers
committer=committer, compat_release=compat_release)
File "/usr/lib/python3/dist-packages/lintian_brush/__init__.py", line 385, in
run_lintian_fixer
local_tree.smart_add([local_tree.basedir])
File "/usr/lib/python3/dist-packages/breezy/git/workingtree.py", line 490, in
smart_add
ignore_glob = self.is_ignored(subp)
File "/usr/lib/python3/dist-packages/breezy/git/workingtree.py", line 640, in
is_ignored
ignore_globs.update(ignores.get_user_ignores())
File "/usr/lib/python3/dist-packages/breezy/ignores.py", line 103, in
get_user_ignores
_set_user_ignores(USER_DEFAULTS)
File "/usr/lib/python3/dist-packages/breezy/ignores.py", line 125, in
_set_user_ignores
config.ensure_config_dir_exists()
File "/usr/lib/python3/dist-packages/breezy/config.py", line 1449, in
ensure_config_dir_exists
os.mkdir(path)
FileNotFoundError: [Errno 2] No such file or directory: '/root/.config/breezy'
To reproduce:
1) docker run -it debian:latest
2) apt update && apt install -y git lintian-brush
3) git clone https://github.com/awslabs/amazon-ecr-credential-helper -b debian
4) cd amazon-ecr-credential-helper; lintian-brush
I was able to fix this by creating the /root/.config/breezy directory.
Note that the default user in a Docker container is root, so the home
being /root is not unexpected.
Thanks!
Sam
-- System Information:
Debian Release: 10.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.15.0-65-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect
Versions of packages lintian-brush depends on:
ii devscripts 2.19.5+deb10u1
ii python3 3.7.3-1
ii python3-breezy 3.0.0~bzr7290-2
ii python3-debian 0.1.35
ii python3-distro-info 0.21
ii python3-dulwich 0.19.11-2
Versions of packages lintian-brush recommends:
ii dos2unix 7.4.0-1
ii gpg 2.2.12-1+deb10u1
ii lintian 2.15.0
lintian-brush suggests no packages.
-- no debconf information