Skip to content

Commit

Permalink
archbuild.in: set pacman cache dir to /var/cache/archbuild32 in case …
Browse files Browse the repository at this point in the history
…of non-x86_64-build, so we do not use any-packages from x86_64 mirrors, and cross-mount inside to /var/cache/pacman/pkg
  • Loading branch information
deep-42-thought authored and eli-schwartz committed Dec 6, 2018
1 parent e9af047 commit 0d93972
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions archbuild.in
Expand Up @@ -47,6 +47,14 @@ done

check_root SOURCE_DATE_EPOCH

if [ "${arch}" = "x86_64" ]; then
cache_dir=''
else
mkdir -p '/var/cache/archbuild32'
cache_dir='-c/var/cache/archbuild32'
makechrootpkg_args+=('-d/var/cache/archbuild32:/var/cache/pacman/pkg')
fi

# Pass all arguments after -- right to makepkg
makechrootpkg_args+=("${@:$OPTIND}")

Expand All @@ -69,13 +77,15 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
setarch "${arch}" mkarchroot \
-C "@pkgdatadir@/pacman-${repo}${arch_ext}.conf" \
-M "@pkgdatadir@/makepkg-${arch}.conf" \
${cache_dir} \
"${chroots}/${repo}-${arch}/root" \
"${base_packages[@]}" || abort
else
lock 9 "${chroots}/${repo}-${arch}/root.lock" "Locking clean chroot"
arch-nspawn \
-C "@pkgdatadir@/pacman-${repo}${arch_ext}.conf" \
-M "@pkgdatadir@/makepkg-${arch}.conf" \
${cache_dir} \
"${chroots}/${repo}-${arch}/root" \
pacman -Syu --noconfirm || abort
fi
Expand Down

0 comments on commit 0d93972

Please sign in to comment.