INNER CODE UNIT · Python

pkg_known

LINBIT/linstor-server · scripts/linstor-controller-ha-setup.py:385

def pkg_known(package):
    """Whether this node's package manager has ever heard of `package`."""
    refresh_pkg_lists()
    name, _, _ = pkg_manager()
    if name == "apt-get":
        query = ["apt-cache", "show", package]
    elif name in ("dnf", "yum"):
        query = [name, "info", "--quiet", package]
    elif name == "zypper":
        query = ["zypper", "--non-interactive", "info", package]
    else:
        return False
    return _run(query, capture=True).returncode == 0


def ipaddr2_package():
    """The package that carries the IPaddr2 OCF agent here. Ask the package
    manager instead of guessing from the distribution family: guessing gets

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…