INNER CODE UNIT · Python
refresh_pkg_lists
LINBIT/linstor-server · scripts/linstor-controller-ha-setup.py:271
def refresh_pkg_lists():
"""Bring the package lists up to date, at most once per run.
Both the probe in pkg_known() and the install below need this. On a freshly
provisioned node apt has no lists yet, so `apt-cache show` reports "no such
package" for something the repository does carry -- and the probe then
settles on the wrong package name.
"""
if _pkg_lists_refreshed:
return
_pkg_lists_refreshed.append(True)
_, _, refresh = pkg_manager()
if refresh:
run(refresh, check=False)
def install_packages(packages, missing_desc, assume_yes=False):
"""Offer to install missing packages from the repositories ALREADY