0

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?

dimisjim
  • 283
  • 2
  • 11
  • `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:50
  • Of course I can fill a bug report with Slack, that's not the question at hand here. – dimisjim Aug 22 '22 at 21:21
  • 2
    Does this answer your question? https://askubuntu.com/questions/1083055/how-can-i-override-a-file-from-packages – user535733 Aug 23 '22 at 02:57
  • Looks like that it potentially can. Have tried it out, let's see if it works when slack tries to do that again. Thanks! – dimisjim Aug 23 '22 at 16:28
  • Hmm, it didn't actually work, tried yesterday something like: `dpkg-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
  • I think I missed `--package slack` flag – dimisjim Aug 25 '22 at 10:39
  • @user535733 the proposed solution hasn't worked. – dimisjim Aug 26 '22 at 16:54
  • eventually the --rename option was necessary, i.e: `sudo dpkg-divert --divert /etc/slack.diverted --rename /etc/apt/sources.list.d/slack.list` – dimisjim Aug 28 '22 at 09:27

0 Answers0