Friday, September 28, 2012

Slot-operator deps for V8

The recently approved EAPI 5 adds a feature called "slot-operator dependencies" to the package manager specification. Once these dependencies are implemented in the portage tree, the package manager will be able to automatically trigger package rebuilds when library ABI changes occur. Long-term, this will greatly reduce the need for revdep-rebuild.

If you are a Chromium user on Gentoo and you don't use portage-2.2, you have probably noticed that we are using the "preserve_old_lib" kludge so that your web browser doesn't break every time you upgrade the V8 Javascript library. This leaves old versions of V8 installed on your system until you manually clean them up. With slot-operator deps, we can eliminate this kludge since portage will have enough information to know it needs to rebuild chromium automatically. It's pretty neat.

I have forked the dev-lang/v8 and www-client/chromium ebuilds into my overlay to test this new feature; we can't really apply it in the main portage tree until a new enough version of portage has been stabilized. I will be maintaining the latest chromium dev channel release, plus a couple of versions of v8 in my overlay.

If you would like to try it out, you can install my overlay with layman -a floppym. Once you've upgraded to the versions in my overlay, upgrading/downgrading dev-lang/v8 should automatically trigger a chromium rebuild.

If you run into any issues, please file a bug.

4 comments:

  1. The only problem is that, until "preserve-libs" is enabled by default in portage-2.1.x, chromium will still break until it's rebuilt (that can take really a long time on some machines)

    ReplyDelete
    Replies
    1. Ah, good point. I actually wasn't sure how that would work.

      Delete
  2. I trust these automatic rebuilds will happen only as needed not after every single v8 rebuild since, afaik, it doesn't always break ABI.

    ReplyDelete
    Replies
    1. Right. I am using the new sub-slot functionality for this. For V8 sub-slot is being set to the first 3 version components, which are also used to set the SONAME. So, the rebuilds happen when the SONAME changes.

      Delete