Skip to content

fontlab_instamix.legacy

legacy

Remove what a legacy install.vfpy created before instamix takes over.

The legacy installers log every created path in Extensions/<id>/install.log (JSON lines). Only paths that the log lists and that are provably the installer's are removed: links that point where the log (or the package) says, folders holding the installer's marker or INSTALLER == install.vfpy, and script files whose SHA-256 matches the logged hash or, for logs without hashes, a file instamix is about to install. Everything else is kept and reported. The log itself stays as history, with an uninstall record appended.

Classes

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
LAUNCHER attribute
LEGACY_INSTALLER attribute
MARKER attribute
MENU attribute
MODULE attribute
active_ids function (data: Path) -> list[str] Ids with an active legacy install.
cleanup_shared function (data: Path) -> list[Path] Remove the shared legacy tools once no legacy install remains.
installed function (data: Path, ext_id: str) -> dict | None The legacy install record of ext_id, if a legacy install is active.
last_state function (path: Path) -> dict | None The newest install/uninstall record in a legacy log, if any.
ledger_text_hash function (text: str) -> str SHA-256 of generated text, as :func:ledger.sha256 hashes the written file.
log_path function (data: Path, ext_id: str) -> Path
migrate function (data: Path, ext_id: str, known: set[str], targets: set[str]) -> dict | None Remove the legacy install of ext_id; return a summary, or None if nothing was done.
move_aside function (data: Path, ext_id: str, state: dict, targets: set[str]) -> list[tuple[str, str]] Move recorded files that sit at install targets into the backup folder.
owns_folder function (path: Path, state: dict) -> bool True for the legacy lib/ (marker with our id) or a legacy dist-info.
plan function (data: Path, state: dict, known: set[str]) -> tuple[list[Path], list[tuple[str, str]]] (paths to remove, [(path, reason)] to keep) for a legacy install record.
previous_install function (data: Path, ext_id: str) -> dict | None The last <code>install</code><code> record of the log, even after a </code><code>migrated&#95;to</code> uninstall.
restore function (moved: list, data: Path | None=None, ext_id: str | None=None) -> None Put files moved by :func:move_aside back; log it when data and ext_id are given.