KernelDB.aliases()
Follow the deduplication trail for a kernel.
Usage
KernelDB.aliases(name_or_hash)Content-addressed deduplication stores one physical file per hash under a single canonical name. This method surfaces every other name that content is known by, so the deduplication is followable.
Aliases are derived from locations, not stored separately. The read-only view kernel_aliases (sha256, filename) exposes every distinct on-disk basename each content hash appears under, so a deduplicated kernel (identical bytes under several names) is followable with no extra bookkeeping. The trade-off is that a name is forgotten once its file is pruned.
The companion alias_counts(shas) maps each hash to its number of known names. alias_counts_by_name(filenames) maps each filename to how many other names its content is known under. It is used to render the (+N aliases) annotation in kernel listings.
Parameters
name_or_hash: str- A full or partial SHA-256 (at least 6 hex characters), the canonical filename, or any alias filename the content has been registered under. Filenames match case-insensitively.
Returns
dict | None-
Noneif nothing matches. Otherwise a dict with the keys:sha256(str)canonical(str): the first-seen filename,kernels.filenamekernel_type(str)size_bytes(int)superseded(bool)- aliases (list[str]): every filename this content is known under
locations(list[dict]): each withabs_path,missionandsource_url