Skip to content

Commit dd2d956

Browse files
committed
fix: Improve upgrade error detection, three-way merge, and UI alignment (v5)
1 parent 3a1bce3 commit dd2d956

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4
1+
5

update.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,8 @@ do_version_upgrade() {
451451
# Use PIPESTATUS to capture dnf exit code, not tee's
452452
sudo dnf system-upgrade download --releasever="$target_version" -y 2>&1 | tee "$download_output"
453453
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
454-
# Check if version doesn't exist
455-
if grep -qi "unable to find.*releasever\|no such.*version\|not found" "$download_output" 2>/dev/null; then
454+
# Check if version doesn't exist (catch 404 errors, missing repos, etc.)
455+
if grep -qiE "unable to find.*releasever|no such.*version|not found|status code: 404|Failed to download metadata|Cannot prepare internal mirrorlist" "$download_output" 2>/dev/null; then
456456
print_error "Fedora $target_version is not available yet."
457457
print_info "This version may not be released or may not be supported for upgrade."
458458
echo ""
@@ -483,7 +483,7 @@ do_version_upgrade() {
483483
# Use PIPESTATUS to capture dnf exit code, not tee's
484484
sudo dnf system-upgrade download --releasever="$target_version" --allowerasing -y 2>&1 | tee "$download_output"
485485
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
486-
if grep -qi "unable to find.*releasever\|no such.*version\|not found" "$download_output" 2>/dev/null; then
486+
if grep -qiE "unable to find.*releasever|no such.*version|not found|status code: 404|Failed to download metadata|Cannot prepare internal mirrorlist" "$download_output" 2>/dev/null; then
487487
print_error "Fedora $target_version is not available."
488488
rm -f "$download_output"
489489
return

0 commit comments

Comments
 (0)