python/mozboot/mozboot/gentoo.py
author Gijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 04 Nov 2014 13:19:33 +0000
changeset 213963 0a16d59bad1edf29c40f1de6dc16cbf129420f59
parent 136251 e872cb70e71943d67d03bce5bf8e494fc230c988
child 221185 f5758bdccc0a052d52206fc9ff4897ab4a8d9f4f
permissions -rw-r--r--
Bug 1080801 - update comments for notification-related tests, rs=comments-only DONTBUILD because comments-only change.

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import os

from mozboot.base import BaseBootstrapper

class GentooBootstrapper(BaseBootstrapper):
    def __init__(self, version, dist_id):
        BaseBootstrapper.__init__(self)

        self.version = version
        self.dist_id = dist_id

    def install_system_packages(self):
        self.run_as_root(['emerge', '--onlydeps', '--quiet', 'firefox'])

        self.run_as_root(['emerge', '--quiet', 'git', 'mercurial'])

    def _update_package_manager(self):
        self.run_as_root(['emerge', '--sync'])

    def upgrade_mercurial(self, current):
        self.run_as_root(['emerge', '--update', 'mercurial'])