APT Package Manager Workflow¶
Specification¶
The full specification below is extracted from Chapter 12: File Management, Packages, and Remote Access on the Pi 500+.
Type: workflow-diagram
**sim-id:** apt-package-manager-workflow<br/>
**Library:** p5.js<br/>
**Template:** https://github.com/dmccreary/data-science-course/tree/main/docs/sims/package-manager-workflow<br/>
**Status:** Specified
Learning objective: Students will *explain* (Bloom L2: Understand) the sequence of steps APT follows to update its package list and install or upgrade software.
Canvas: 700x420px, responsive — recompute node positions as fractions of `width`/`height` inside `windowResized()`.
Layout: four connected boxes in sequence: "Remote APT repositories" → "sudo apt update (refreshes local package list)" → "sudo apt upgrade (installs newer versions of existing packages)" and, branching separately from the same "local package list" box, "sudo apt install <name> (installs a brand-new package)." Use raspberry `#C2185B` for the two commands that only read from repositories (`update`) and copper gold `#D4AF37` for the two that change the installed system (`upgrade`, `install`).
Controls: a `createSelect()` dropdown labeled "Scenario" with two options, "Upgrading existing software" and "Installing python3-pip," each highlighting the matching path through the diagram.
Interaction: clicking any box opens an infobox with a one-sentence explanation matching the chapter's prose. Clicking "Remote APT repositories" explains that this is where package version information actually lives, off of the Pi 500+ itself. A small always-visible caption notes "apt update never installs software by itself — it only refreshes information."
Implementation: p5.js. Store boxes and their connections as a small array of `{label, x, y, color, definition}` objects with explicit from/to connection pairs, redrawn with arrows each frame. Rectangle-based hit-testing in `mousePressed()` for click interactions.