1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 from mozboot
.base
import BaseBootstrapper
6 from mozboot
.linux_common
import LinuxBootstrapper
9 class GentooBootstrapper(LinuxBootstrapper
, BaseBootstrapper
):
10 def __init__(self
, version
, dist_id
, **kwargs
):
11 BaseBootstrapper
.__init
__(self
, **kwargs
)
13 self
.version
= version
14 self
.dist_id
= dist_id
16 def install_packages(self
, packages
):
18 "gzip": "app-arch/gzip",
19 "tar": "app-arch/tar",
21 # watchman is available but requires messing with USEs.
22 packages
= [DISAMBIGUATE
.get(p
, p
) for p
in packages
if p
!= "watchman"]
23 self
.run_as_root(["emerge", "--noreplace"] + packages
)
25 def _update_package_manager(self
):
26 self
.run_as_root(["emerge", "--sync"])
28 def upgrade_mercurial(self
, current
):
29 self
.run_as_root(["emerge", "--update", "mercurial"])