Commit 8cd63f0
fix: remove conflicting pool files before publishing
When packages are rebuilt with the same version but different content,
aptly fails to publish with "file already exists and is different" error.
Fix: Before publishing, scan snapshots for packages and remove any
existing pool files that match. This is safe because aptly will re-link
the correct files during publish.
This handles the case where:
1. Package v1 was built and published (pool has file A)
2. Package v1 was rebuilt with different content (isolated pool has file B)
3. Merge imports file B to main pool
4. Publish tries to link file B but file A already exists -> ERROR
Now we remove file A before publishing, so file B can be linked cleanly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent ea4a68a commit 8cd63f0
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
938 | 957 | | |
939 | 958 | | |
940 | 959 | | |
| |||
0 commit comments