Skip to content

database: follow --cache-dir option for static APK cache

Christian Marangi requested to merge Ansuel/apk-tools:fix-static-cache into master

Follow --cache-dir option also for static APK cache fallback. If option is not set the default hardcoded path is still used.

This is to handle case where APK is used on non-linux host where advanced mount and map feature are not supported and APK cache is a simple directory. In such case the static APK cache is always used and path was hardcoded to the default path without possibility to change it.

To better handle this, rework cache setup handling and introduce setup_arch_cache to make specific cache setup for the os and unify setup_static_cache and setup_cache in a single function.

Signed-off-by: Christian Marangi ansuelsmth@gmail.com

Edited by Christian Marangi

Merge request reports

Loading