I have an app that stores the keyring to the legacy trusted.gpg location and getting the following error:
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
I have followed this great answer here https://askubuntu.com/a/1398346/827401, and modified the .list file in question that causes this. However, the application (slack) keeps on editing the .list file, removing the part when the manual fix/hack was implemented by the aforementioned answer.
There is of course the comment in the .list file that warns about this:
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
How does one prevent apt (and to an extent the maintainer of said package) to NOT modify a particular .list file?
W:
means "warning", which is different than an "error". When emitting a warning, apt will still complete whatever you asked it to do. When encountering an error, apt does not complete the action. One fixes this particular warning ('Slack stores gpg key in deprecated location') by filing a bug report with Slack. – user535733 Aug 22 '22 at 18:50dpkg-divert --divert /etc/apt/sources.list.d/slack.diverted /etc/apt/sources.list.d/slack.list
but today the .list file was still overwritten again. – dimisjim Aug 25 '22 at 05:38--package slack
flag – dimisjim Aug 25 '22 at 10:39sudo dpkg-divert --divert /etc/slack.diverted --rename /etc/apt/sources.list.d/slack.list
– dimisjim Aug 28 '22 at 09:27