Skip to content

Commit

Permalink
USHIFT-2241: use unique repo name when extracting container images
Browse files Browse the repository at this point in the history
Reusing the same temporary repo name for different repository locations
can introduce issues if the dnf cache is not updated. Use the base name
of the repository URL as a unique name.
  • Loading branch information
dhellmann committed Jan 31, 2024
1 parent 2cac32d commit 38afa26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/bin/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ extract_container_images() {
local -r version=$1
local -r repo_url=$2
local -r outfile=$3
local -r repo_name="microshift-extract-images"

echo "Extracting images from ${version}"
mkdir -p "${IMAGEDIR}/release-info-rpms"
pushd "${IMAGEDIR}/release-info-rpms"
dnf_options=""
if [[ -n ${repo_url} ]]; then
local -r repo_name="$(basename "${repo_url}")"
dnf_options="--repofrompath ${repo_name},${repo_url} --repo ${repo_name}"
fi
# shellcheck disable=SC2086 # double quotes
Expand Down

0 comments on commit 38afa26

Please sign in to comment.