# 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 subprocess import sys
from mozboot.base import MERCURIAL_INSTALL_PROMPT, BaseBootstrapper from mozboot.linux_common import LinuxBootstrapper
def install_packages(self, packages): try: if int(self.version) < 11: # watchman is only available starting from Debian 11.
packages = [p for p in packages if p != "watchman"] except ValueError: pass
def upgrade_mercurial(self, current): """Install Mercurial from pip because Debian packages typically lag.""" if self.no_interactive: # Install via Apt in non-interactive mode because it is the more # conservative option and less likely to make people upset.
self.apt_install("mercurial") return
res = self.prompt_int(MERCURIAL_INSTALL_PROMPT, 1, 3)
# Apt. if res == 2:
self.apt_install("mercurial") returnFalse
# No Mercurial. if res == 3:
print("Not installing Mercurial.") returnFalse
# pip. assert res == 1
self.run_as_root(["pip3", "install", "--upgrade", "Mercurial"])
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.