gnome-browser-extension-mirror
gnome-browser-extension-mirror copied to clipboard
Installed extensions page shows updates available for system extensions
Following up on https://github.com/nE0sIghT/chrome-gnome-shell-mirror/issues/78, it looks like I am actually seeing an issue. The version of the code I'm using is supposed to not check for updates on system extensions, and it looks like that's working, i.e. the json returned to the browser doesn't contain the "version" key.
"[email protected]": {
"extension-id": "places-menu",
"uuid": "[email protected]",
"settings-schema": "org.gnome.shell.extensions.places-menu",
"gettext-domain": "gnome-shell-extensions",
"name": "Places Status Indicator",
"description": "Add a menu for quickly navigating places in the system.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME Bugzilla instead.",
"url": "http://git.gnome.org/gnome-shell-extensions",
"type": 1,
"state": 1,
"path": "/usr/share/gnome-shell/extensions/[email protected]",
"error": "",
"hasPrefs": false
}
I think I have tracked the problem down to the Gnome website, which uses the following script on the Installed Extensions page: https://extensions.gnome.org/static/js/extensions.44c10442d280.js
Specifically this bit of code here, starting on line 273:
if (_state !== ExtensionState.UNINSTALLED && latest !== null &&
(!meta.version || latest.version > meta.version || _state === ExtensionState.OUT_OF_DATE))
{
$elem.addClass('upgradable');
}
meta.version
gets populated from the json sent to the browser, and so it's undefined for system extensions. That means that all system extensions get marked as upgradable. That's exactly the behavior I see, as shown in the screenshot below.
That was made "by design".
- If you have some system extensions - chrome-gnome-shell will not check updates for them.
- if you go at e.g.o. then you will see all your system extensions and available updates for them. And you are free to install or not to install updates.
- If you install update for system extension - it became local extension.
- chrome-gnome-shell will check updates for local extensions that replaced system extensions.
Seems like a bug for it to be shown as "upgradable". Should be a "convert to local extension" button instead, or something. It's not at all obvious what will happen when one tries to upgrade a system extension at present.