advance: skip same-name files with differing bytes instead of failing
Incremental advances collide with same-version artifacts that reached the destination through another lineage — the stable -> rc bootstrap seed and native rc builds are not byte-identical to edge's builds of the same version. A collision means the package has not moved in the source since, so keep the destination's published copy and continue; the hard failure also aborted before the db rebuild and sync, leaving the advance half-done. Also stop advancing pinned packages into rc: eligibility deferred to package_builds_for_mirror, whose OMARCHY_RC_PINS gate is never set during an advance, so edge's omarchy/omarchy-settings looked movable — and could have overtaken an in-flight RC pin under a fresh filename.
This commit is contained in:
2 files changed
+11
-7
No files matched your search
+6
-7
@@ -326,7 +326,7 @@ while IFS=$'\t' read -r name base filename; do
|
||||
done < <(read_manifest)
|
||||
|
||||
echo ""
|
||||
print_info "Copied: $COPIED | Already present: $PRESENT | Not eligible: $SKIPPED"
|
||||
print_info "Copied: $COPIED | Already present: $PRESENT | Differing (kept): ${#DIFFERING[@]} | Not eligible: $SKIPPED"
|
||||
|
||||
if [[ ${#MISSING_FILES[@]} -gt 0 ]]; then
|
||||
print_error "${#MISSING_FILES[@]} package(s) named in the $FROM database are missing on disk:"
|
||||
@@ -345,13 +345,12 @@ if [[ ${#MISSING_SIGS[@]} -gt 0 ]]; then
|
||||
fi
|
||||
|
||||
if [[ ${#DIFFERING[@]} -gt 0 ]]; then
|
||||
print_error "${#DIFFERING[@]} file(s) already published in $TO with DIFFERENT bytes:"
|
||||
print_warning "${#DIFFERING[@]} file(s) already published in $TO with different bytes — kept as-is:"
|
||||
printf ' %s\n' "${DIFFERING[@]}"
|
||||
echo "Published filenames are never rewritten, and two artifacts fighting over"
|
||||
echo "one name means something built twice from different inputs. Resolve it"
|
||||
echo "deliberately: bump pkgrel and rebuild so the new artifact gets a new"
|
||||
echo "filename, or remove the source copy if the destination is correct."
|
||||
exit 1
|
||||
echo "Published filenames are never rewritten, so the $TO copy stays authoritative."
|
||||
echo "A same-name collision means this version reached $TO through another lineage"
|
||||
echo "(native build, bootstrap seed, or a same-version rebuild) and the package has"
|
||||
echo "not moved in $FROM since; it advances under a new filename when it does."
|
||||
fi
|
||||
|
||||
if [[ "$DRY_RUN" == true ]]; then
|
||||
|
||||
@@ -269,6 +269,11 @@ package_builds_for_mirror() {
|
||||
package_moves_to_channel() {
|
||||
local pkgdir="$1" channel="$2"
|
||||
package_in_channel "$pkgdir" "$channel" || return 1
|
||||
# Pinned packages build natively in rc from the release pin. That the
|
||||
# advancing environment lacks OMARCHY_RC_PINS (so *it* may not build them)
|
||||
# does not make the edge copy movable over the pin's artifact — edge's
|
||||
# version can be ahead of the in-flight RC.
|
||||
[[ "$channel" == "rc" ]] && package_is_pinned "$pkgdir" && return 1
|
||||
! package_builds_for_mirror "$pkgdir" "$channel"
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user