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>
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.
This ensures that the gid's for the auto-generated user groups stay in
sync with the gid in /etc/passwd. It also makes it easier to evolve the
format of /etc/group in the future.
This allows redirecting the location packages are installed using
symlinks. This makes it much easier to change the filesystem hierarchy
by not having to change every recipe in the cookbook.
I sorta OOP'ed this, combining the logic of what needs to happen for
each config object with those objects. More things are coming, this is a
very WIP commit.