mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-09 06:04:12 +00:00
0a98d9fdc3
### api/snapshot.go — fix apiSnapshotsCreate The function was building the new snapshot's ref list only from b.PackageRefs, completely ignoring SourceSnapshots package contents (they were stored as provenance metadata only). The fix mirrors the approach from apiSnapshotsMerge: 1. Start with source snapshots: merge all freshSources[i].RefList() together using Merge(overrideMatching=true) 2. Layer explicit PackageRefs on top: only enter the package-loading loop if b.PackageRefs is non-empty, then merge the result into refList 3. Pass the combined refList to NewSnapshotFromRefList This means an empty snapshot (SourceSnapshots: [], PackageRefs: []) still correctly produces an empty ref list, single-source and multi-source snapshot-of-snapshot cases are now handled, and PackageRefs can still augment or override on top of the merged sources. ### system/t12_api/publish.py — fix PublishSwitchAPITestSnapshot - Removed the # FIXME comment - Changed check_not_exists → check_exists for pyspi-0.6.1-1.3.stripped.dsc after the publish-switch to snapshot2, which is now the correct expectation since snapshot2 inherits all packages from snapshot1
System test for aptly