diskimage-builder/elements/zypper/root.d/50-zypper-cache
Chris Krelle 6077bd8b06 Ensure cache directory exists before use
Ensure cache mount directory exists before its used. The zypper element
would error when attempting to mount the cache directory because the
mount point did not exist. This patch corrects that.

Change-Id: Iaa3c2a0254b12bd847643a61a99f5a234097fd21
2014-06-24 16:35:59 -07:00

13 lines
247 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
[ -n "$TARGET_ROOT" ]
ZYPPER_CACHE_DIR=~/.cache/image-create/zypper
mkdir -p $ZYPPER_CACHE_DIR
sudo mkdir -p $TMP_MOUNT_PATH/var/cache/zypp
sudo mount --bind $ZYPPER_CACHE_DIR $TMP_MOUNT_PATH/var/cache/zypp