From 2f1a232fa0f8de918d0616203ae2c18a31bfa686 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Fri, 16 Aug 2019 13:45:45 +0200 Subject: Fixes bugs in 'importimage': it only created the lockfile if target repository content a image with same name that imported image. --- repoman/bin/importimage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repoman/bin') diff --git a/repoman/bin/importimage b/repoman/bin/importimage index 58a3d8a9..63bcf865 100755 --- a/repoman/bin/importimage +++ b/repoman/bin/importimage @@ -64,9 +64,9 @@ IMAGESIZE="$(jq -r '.size' <<< "$IMAGEINFO" 2>/dev/null)" [ -z "$IMAGESIZE" ] && raiseError access "Cannot retrieve image size" # Checking if local image exists. IMAGEPATH="$REPODIR/$IMAGENAME.$IMAGETYPE" +LOCKFILE="$IMAGEPATH.lock" if [ -e "$IMAGEPATH" ]; then # Checking if local image is locked. - LOCKFILE="$IMAGEPATH.lock" [ -f "$LOCKFILE" ] && raiseError access "Local image is locked, cannot write." # Confirm image download. read -rp "Image $IMAGENAME exists in the local repository. Do you want to continue? (y/N): " ANSWER -- cgit v1.2.3-18-g5258