Ensure we aren't sharing mirror caches between channels
This commit is contained in:
1 parent
7e830d6a28
commit
2ed796535d
1 file changed
+3
-4
@@ -79,11 +79,10 @@ if [ -d "/var/cache/pacman/pkg" ]; then
|
|||||||
DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg")
|
DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount the build cache directory where packages are downloaded
|
# Mount the build cache directory where packages are downloaded. Channels use
|
||||||
|
# different package snapshots and must never share an offline mirror cache.
|
||||||
if [[ -z "$NO_CACHE" ]]; then
|
if [[ -z "$NO_CACHE" ]]; then
|
||||||
# using a dated dir on the host to refresh daily if building multiple times
|
OFFLINE_REPO_BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${OMARCHY_MIRROR}/airootfs/var/cache/omarchy"
|
||||||
BUILD_DATE=$(date +%Y-%m-%d)
|
|
||||||
OFFLINE_REPO_BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
|
|
||||||
mkdir -p "$OFFLINE_REPO_BUILD_CACHE_DIR"
|
mkdir -p "$OFFLINE_REPO_BUILD_CACHE_DIR"
|
||||||
# Mount to /var/cache/airootfs/var/cache/omarchy since that's where repo packages go in the ISO
|
# Mount to /var/cache/airootfs/var/cache/omarchy since that's where repo packages go in the ISO
|
||||||
DOCKER_ARGS+=(-v "$OFFLINE_REPO_BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy")
|
DOCKER_ARGS+=(-v "$OFFLINE_REPO_BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy")
|
||||||
|
|||||||
Reference in new issue
Block a user