makechrootpkg: cache dir
This commit is contained in:
parent
6dd7be3fd4
commit
28b363bff8
|
@ -57,6 +57,7 @@ usage() {
|
||||||
echo 'Flags:'
|
echo 'Flags:'
|
||||||
echo '-h This help'
|
echo '-h This help'
|
||||||
echo '-c Clean the chroot before building'
|
echo '-c Clean the chroot before building'
|
||||||
|
echo '-C <dir> Set pacman cache to pass to arch-nspawn'
|
||||||
echo '-d <dir> Bind directory into build chroot as read-write'
|
echo '-d <dir> Bind directory into build chroot as read-write'
|
||||||
echo '-D <dir> Bind directory into build chroot as read-only'
|
echo '-D <dir> Bind directory into build chroot as read-only'
|
||||||
echo '-u Update the working copy of the chroot before building'
|
echo '-u Update the working copy of the chroot before building'
|
||||||
|
@ -275,12 +276,13 @@ move_products() {
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
while getopts 'hcur:I:l:nCTD:d:U:' arg; do
|
while getopts 'hcuC:r:I:l:nCTD:d:U:' arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
c) clean_first=1 ;;
|
c) clean_first=1 ;;
|
||||||
D) bindmounts_ro+=("--bind-ro=$OPTARG") ;;
|
D) bindmounts_ro+=("--bind-ro=$OPTARG") ;;
|
||||||
d) bindmounts_rw+=("--bind=$OPTARG") ;;
|
d) bindmounts_rw+=("--bind=$OPTARG") ;;
|
||||||
u) update_first=1 ;;
|
u) update_first=1 ;;
|
||||||
|
C) cache_dir="-c $OPTARG" ;;
|
||||||
r) passeddir="$OPTARG" ;;
|
r) passeddir="$OPTARG" ;;
|
||||||
I) install_pkgs+=("$OPTARG") ;;
|
I) install_pkgs+=("$OPTARG") ;;
|
||||||
l) copy="$OPTARG" ;;
|
l) copy="$OPTARG" ;;
|
||||||
|
@ -363,7 +365,7 @@ download_sources
|
||||||
|
|
||||||
prepare_chroot
|
prepare_chroot
|
||||||
|
|
||||||
if arch-nspawn "$copydir" \
|
if arch-nspawn $cache_dir "$copydir" \
|
||||||
--bind="${PWD//:/\\:}:/startdir" \
|
--bind="${PWD//:/\\:}:/startdir" \
|
||||||
--bind="${SRCDEST//:/\\:}:/srcdest" \
|
--bind="${SRCDEST//:/\\:}:/srcdest" \
|
||||||
--tmpfs="/tmp:${tmp_opts}" \
|
--tmpfs="/tmp:${tmp_opts}" \
|
||||||
|
|
Loading…
Reference in New Issue