INNER CODE UNIT · Python
lists_dir
WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_repo.py:85
def lists_dir():
"""Where apt keeps the downloaded indexes.
Overridable so the test suite can point at a fixture directory. It is NOT a
way to feed the window invented data at runtime: the shipped launcher never
sets it, and the window prints the directory it read in its footer.
"""
return os.environ.get("KODACHI_REPO_LISTS_DIR") or DEFAULT_LISTS_DIR
def apt_lists_present(directory=None):
"""True when apt holds at least one downloaded binary package index.
WHY THIS EXISTS. `apt-cache policy` answers out of the indexes in
lists_dir(). With no indexes it still exits 0 and still prints stanzas for
the handful of names dpkg knows, so the caller sees a well-formed answer
that says every package is unofferable. `favourite_rows()` then returns
`unavailable` for the whole catalog, and the page tells the user the package