command-not-found - WARNING:root:could not open file '/etc/apt/sources.list'

command-not-found works [1], however is showing that warning.

WARNING:root:could not open file ‘/etc/apt/sources.list’

Whonix does not ship /etc/apt/sources.list but only files in /etc/apt/sources.list.d/ drop-in folder.
( https://github.com/Whonix/anon-apt-sources-list )
That is because file /etc/apt/sources.list managed by a package could conflict with local users, causing interactive dpkg config resolution dialog.

Considering to apply the following workaround.

sudo touch /etc/apt/sources.list
sudo chmod o+r /etc/apt/sources.list

The latter command required due to umask hardening. (Change default umask.)

Any reason against creating an empty /etc/apt/sources.list which is not managed by any package?

[1] Well, perhaps except from requriing another workaround which breaks it, see this post: Change default umask..

[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Investors] [Priority Support] [Professional Support]