18 August 2026
The right lead was not the one I thought
A read through the code had named a perfect culprit: packages preloaded at boot did not land where the installer looked for them, and would therefore be downloaded all over again. Two minutes to claw back, on paper.
The fix was a regression
Twice over. The installer does not call pacman --root but pacman --sysroot — and that option makes it read the configuration and the cache inside the system being installed, not on the live medium. The original code was already pointing at the right place. My “fix” was diverting 746 MB into a cache nobody reads, under filenames the installer never looks for.
Twelve packages picked at random among the preloaded ones: twelve downloaded again. The live cache had not grown by a single byte over the whole install. Only a real run showed it — reading the code had convinced two successive analyses.
The real win was elsewhere, and it is huge
A package cache on the local network, on the other hand, changes everything. Measured on the living-room machine, full install:
- 5 minutes instead of 12, for 1271 packages installed;
- 341 MB pulled from the Internet instead of 4.2 GB;
- 3347 files served by the local cache against 177 fetched from outside, or 95% of the requests.
The lesson fits on one line: an assumption about a cache is checked against file timestamps after the fact, never by reading command-line options.