def read_ppips(ppips_file):
    """
    Loads and parses ppips_*.db file. Returns a dict indexed by PIP name which
    contains their types ("always", "default" or "hint")
    """
    ppips = {}

    with open(ppips_file, "r") as fp:
        for line in fp.readlines():
            line = line.split()
            if len(line) == 2:
                full_pip_name = line[0].split(".")
                pip_name = ".".join(full_pip_name[1:])
                ppips[pip_name] = line[1]

    return ppips