Dear Maintainer,
I have updated my sources list with "apt modernize-sources";
now I have the file "/etc/apt/sources.list.d/debian.sources" and the old
"/etc/apt/sources.list" does not exists anymore.
If I run the command "apt-clone clone test" it crashes with this error:
Traceback (most recent call last):
File "/usr/bin/apt-clone", line 108, in <module>
clone.save_state(args.source, args.destination,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.with_dpkg_repack, args.with_dpkg_status,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
extra_files=args.extra_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/apt_clone.py", line 154, in save_state
self._write_state_installed_pkgs(sourcedir, tar)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/apt_clone.py", line 192, in _write_state_installed_pkgs
cache = self._cache_cls(rootdir=sourcedir)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 149, in __init__
self._check_and_create_required_dirs(rootdir)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3/dist-packages/apt/cache.py", line 191, in _check_and_create_required_dirs
open(rootdir + f, "w").close()
~~~~^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '//etc/apt/sources.list'
I think apt-clone should be aware of the new format and not crash if a
file is missing; ideally it should backup both files if present.
Thanks