expand_group inserted the group's own name into `resolved` (the package
accumulator), so a nested-group reference (kde-desktop -> dbus-services)
added a bogus "dbus-services" package. `repo cook --filesystem` then
failed with 'Package PackageName("dbus-services") not found'.
Track expanded GROUP names in a separate `expanded` set used only for
dedup/cycle short-circuit; only real leaf package names go into
`resolved`. Groups contribute their members, never themselves.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
resolve_package_groups inserted PackageConfig::default() (the untagged `Empty`
unit variant) for group-expanded packages. `Empty` cannot serialize to TOML, so
`toml::to_string_pretty(&config)` (used to embed filesystem.toml, and run on
every install/--filesystem-size) panicked with UnsupportedType(Some("unit")) for
any config using [package_groups] (e.g. redbear-full). Insert the same all-None
Spec that an explicit `pkg = {}` entry deserializes to.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
--filesystem-size previously just echoed config.general.filesystem_size (or 0),
so every target hardcoded a magic image size that either wasted space or
overflowed (ENOSPC / os error 28) as the package set changed.
Add compute_filesystem_size_mb(): when filesystem_size is not pinned, size the
RedoxFS image from the ACTUAL package contents — walk the transitive package
closure (config [packages] + each pkgar's `depends`), do per-file block
accounting (ceil(size/BLOCK_SIZE) data blocks + one node block per entry), add
record-tree/header structural overhead and a free-space margin so the live/
writable filesystem is usable. An explicit filesystem_size still overrides.
Identical logic for mini/full/bare/grub/any config.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pre-existing uncommitted work (materialized by the build's local-over-WIP
preflight): CollisionTracker detects config [[files]] (Layer 1) being
silently overwritten by package staging (Layer 2) — the D-Bus regression
class. Committed as-is so the fork has a clean HEAD for pkgar fingerprints;
no functional change intended by this commit beyond tracking it.
Replace silent files.extend() with explicit override detection: when a
later-included config redefines a [[files]] path, warn on the console and
replace in place (last definition wins, no duplicate left). Makes the
previously-invisible, order-dependent config override visible.