October 16, 2010

What your distro can do for you that upstream cannot

Some time ago a user on Gentoo Forums has pointed out that gecko-mediaplayer plugin does not load in www-client/chromium. It turns out there is a compatibility issue that leads to a browser hang, so upstream just blacklisted the plugin (based on file name). The browser has a hardcoded list of plugins that it will not load at all.

The good part is that the hang only occurs when gecko-mediaplayer is compiled with USE="gnome". With -gnome it doesn't hang the browser. But how can the upstream know? The file name is the same in both cases.

Well, in Gentoo the package manager does know which USE flags were used to compile any package. I decided to add a gecko-mediaplayer USE flag to www-client/chromium. When enabled (that's the default setting), it will make sure gecko-mediaplayer is compiled with -gnome (if installed), and remove it from the hardcoded blacklist.

Moreover, if you're a GNOME user or just happen to have gnome in USE, you can disable the flag just for one package by using /etc/portage/package.use. Or you can choose to compile gecko-mediaplayer with whatever USE flags you want, and disable support for it in www-client/chromium to avoid the blocking dependency.

USE="gecko-mediaplayer" is available for >=www-client/chromium-7.0.544.0-r1. It is hard masked for now, but sooner or later will become stable. Please help with testing, and enjoy your www-client/chromium!