Remove existing apk cache symlink before creating link (#866)

This removes any existing symlinks (which always seem to be broken when
this is encountered) to <workdir>/chroot_native/etc/apk/cache before
creating the symlink.
This commit is contained in:
clayton craft 2017-11-03 19:19:23 -07:00 committed by Oliver Smith
parent 7eb3b6dda3
commit 2987294ea6
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ def init(args, suffix="native"):
# Initialize cache
apk_cache = args.work + "/cache_apk_" + arch
pmb.helpers.run.root(args, ["ln", "-s", "/var/cache/apk", chroot +
pmb.helpers.run.root(args, ["ln", "-s", "-f", "/var/cache/apk", chroot +
"/etc/apk/cache"])
# Initialize /etc/apk/keys/, resolv.conf, repositories