Repository: servo/servo
File: python/servo/platform/linux.py (Python)

Code before:
        if file.endswith(".txt") and file.startswith("apt_"):
            apt_pkgs.extend(parse_pkg_file(file))
    if len(apt_pkgs) == 0:
        raise RuntimeError("No apt packages found.")
    return apt_pkgs


def dnf_packages() -> list[str]:
    basepath = os.path.dirname(__file__)
    dnf_pkgs: list[str] = []
    for file in os.listdir(os.path.join(basepath, "linux_packages", "dnf")):
        if file.endswith(".txt") and file.startswith("dnf_"):
            dnf_pkgs.extend(parse_pkg_file(file))
    if len(dnf_pkgs) == 0:
        raise RuntimeError("No dnf packages found.")
    return dnf_pkgs


def xbps_packages() -> list[str]:
    basepath = os.path.dirname(__file__)
    pkgs: list[str] = []
    for file in os.listdir(os.path.join(basepath, "linux_packages", "xbps")):
        if file.endswith(".txt") and file.startswith("xbps_"):
            pkgs.extend(parse_pkg_file(file))
    if len(pkgs) == 0:
        raise RuntimeError("No dnf packages found.")
    return pkgs


class Linux(Base):
    def __init__(self, *args: str, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.is_linux = True
        self.distro = distro.name()

    def _platform_bootstrap(self, force: bool, yes: bool) -> bool:
        if self.distro.lower() == "nixos":
            print("NixOS does not need bootstrap, it will automatically enter a nix-shell")
            print("Just run ./mach build")
            print("")
            print("You will need to run a nix-shell if you are trying to run any of the built binaries")
            print("To enter the nix-shell manually use:")
            print("  $ nix-shell")
            return False

        if self.distro.lower() not in [
            "arch linux",
            "arch",
            "artix",
            "endeavouros",
            "centos linux",

Review comment (suggestion):
```suggestion
        raise RuntimeError("No xbps packages found.")
```

Code after:
        if file.endswith(".txt") and file.startswith("apt_"):
            filepath = os.path.join(basepath, "linux_packages", "apt", file)
            apt_pkgs.extend(parse_pkg_file(filepath))
    if len(apt_pkgs) == 0:
        raise RuntimeError("No apt packages found.")
    return apt_pkgs


def dnf_packages() -> list[str]:
    basepath = os.path.dirname(__file__)
    dnf_pkgs: list[str] = []
    for file in os.listdir(os.path.join(basepath, "linux_packages", "dnf")):
        if file.endswith(".txt") and file.startswith("dnf_"):
            filepath = os.path.join(basepath, "linux_packages", "dnf", file)
            dnf_pkgs.extend(parse_pkg_file(filepath))
    if len(dnf_pkgs) == 0:
        raise RuntimeError("No dnf packages found.")
    return dnf_pkgs


def xbps_packages() -> list[str]:
    basepath = os.path.dirname(__file__)
    pkgs: list[str] = []
    for file in os.listdir(os.path.join(basepath, "linux_packages", "xbps")):
        if file.endswith(".txt") and file.startswith("xbps_"):
            filepath = os.path.join(basepath, "linux_packages", "xbps", file)
            pkgs.extend(parse_pkg_file(filepath))
    if len(pkgs) == 0:
        raise RuntimeError("No xbps packages found.")
    return pkgs


class Linux(Base):
    def __init__(self, *args: str, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.is_linux = True
        self.distro = distro.name()

    def _platform_bootstrap(self, force: bool, yes: bool) -> bool:
        if self.distro.lower() == "nixos":
            print("NixOS does not need bootstrap, it will automatically enter a nix-shell")
            print("Just run ./mach build")
            print("")
            print("You will need to run a nix-shell if you are trying to run any of the built binaries")
            print("To enter the nix-shell manually use:")
            print("  $ nix-shell")
            return False

        if self.distro.lower() not in [
            "arch linux",
            "arch",