7

I am running Debian 13 (Trixie) and recently modernized my apt sources to the new deb822 format (.sources files). My system has the i386 architecture enabled (for, e.g., Wine), apt update throws the following informational warning for the Google Chrome repository:

Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://dl.google.com/linux/chrome-stable/deb stable InRelease' doesn't support architecture 'i386'

I fixed this by adding Architectures: amd64 to /etc/apt/sources.list.d/google-chrome.sources. However, every time the Google Chrome repository is updated, its post-install script brutally overwrites my .sources file, removing the Architectures: amd64 line and causing the warning to return.

I have tried modifying /etc/default/google-chrome and changed repo_add_once="false" to repo_add_once="true" but the Chrome update script completely ignores this. During the apt update, it actually overwrites /etc/default/google-chrome back to its default state (false) and regenerates the .sources file anyway.

Is there a clean, native way to permanently disable the Google Chrome post-install script from touching the /etc/apt/sources.list.d/ directory and /etc/default/google-chrome upon every package upgrade?

1 Answer 1

6

Supposedly, the clean way to permanently disable this is shown on the download page:

Note: Installing Google Chrome will add the Google repository so your system will automatically keep Google Chrome up to date. If you don’t want Google's repository, do “sudo touch /etc/default/google-chrome” before installing the package.

The postrm clarifies this:

# Only remove the defaults file if it is not empty. An empty file was probably
# put there by the sysadmin to disable automatic repository configuration, as
# per the instructions on the package download page.

So the safe way to disable this is apparently to ensure that /etc/default/google-chrome is empty. However that only works for new installations; if a google-chrome.sources file is present on upgrade (or re-install), it is overwritten.

What actually works is to rename the repository configuration file. It can then be edited, and the renamed file won’t be touched on upgrade (and the original file won’t be restored).

The postinst script interprets repo_add_once=true (and variants thereof) as requesting the installation of the repository configuration; once that’s been done, it sets it to false, which disables future repository configuration. There’s also a repo_reenable_on_distupgrade flag but doesn’t appear to be used in the maintainer scripts.

Ironically, the old repository configuration specified [arch=amd64]

4
  • This is brilliant and exactly what I was looking for, thank you! One important caveat that I found: by disabling the script, I also disable the automatic rotation of Google's GPG keys. If Google updates their keys in the future, apt update will fail with a signature verification error, and I will have to manually fetch the new key. But maybe until then, Google will fix the missing Architectures: amd64 in the .sources file anyway. Commented Apr 13 at 10:06
  • Wow, Chrome really switched to .sources in 147.0.7727.55-1. I was on 146.0.7680.177-1 and it still used .list Commented Apr 13 at 15:18
  • Unfortunately, after the google-chrome-stable update to version 147.0.7727.101-1 the problem came back. Architectures: amd64 was removed again and /etc/default/google-chrome is non-empty (repo_add_once="false" was added). Commented Apr 15 at 19:58
  • Indeed; I’ve updated the answer. Commented Apr 16 at 18:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.