diff options
author | Irina Gómez <irinagomez@us.es> | 2019-08-16 13:45:45 +0200 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-08-16 13:45:45 +0200 |
commit | 2f1a232fa0f8de918d0616203ae2c18a31bfa686 (patch) | |
tree | 6ced328b4df31226c1b726de5369c4f1001e524a /repoman | |
parent | 014ed6e228c025ed5acf6d485200c52cb9d17d24 (diff) |
Fixes bugs in 'importimage': it only created the lockfile if target repository content a image with same name that imported image.
Diffstat (limited to 'repoman')
-rwxr-xr-x | repoman/bin/importimage | 2 |
1 files changed, 1 insertions, 1 deletions
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 |