Merge "Write fedora download redirect info to stderr"

This commit is contained in:
Zuul 2024-04-17 19:17:18 +00:00 committed by Gerrit Code Review
commit d95c475c3a
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ else
exit 1
;;
esac
SUBRELEASE=$(head -1 < <(curl -Ls $DIB_CLOUD_IMAGES/ | grep -o -P '(?<=Fedora-Cloud-Base-'${DIB_RELEASE}'-).*?(?=.'${ARCH}'.qcow2")' | sort -r))
# We have curl write headers to stderr so that we can debug fedora
# mirror locations that don't have valid subreleases in their paths.
SUBRELEASE=$(head -1 < <(curl -Lis -D /dev/stderr $DIB_CLOUD_IMAGES/ | grep -o -P '(?<=Fedora-Cloud-Base-'${DIB_RELEASE}'-).*?(?=.'${ARCH}'.qcow2")' | sort -r))
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-Fedora-Cloud-Base-$DIB_RELEASE-$SUBRELEASE.$ARCH.qcow2}
BASE_IMAGE_TAR=Fedora-Cloud-Base-$DIB_RELEASE-$SUBRELEASE.$ARCH.tgz
IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE