revert copy flag; needs different approach

This commit is contained in:
udeved 2016-05-10 17:54:59 +02:00
parent 35985c4254
commit 7686101a9c
3 changed files with 5 additions and 12 deletions

View file

@ -145,7 +145,7 @@ pacman_conf="${DATADIR}/pacman-${pacman_conf_arch}.conf"
makepkg_conf="${DATADIR}/makepkg-${arch}.conf"
mirrors_conf="${DATADIR}/pacman-mirrors-${branch}.conf"
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}" -x)
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}")
mkchrootpkg_args+=(-r ${work_dir})

View file

@ -20,7 +20,6 @@ import ${LIBDIR}/util-mount.sh
working_dir=''
keep_mirrors=false
copy_pac_conf=false
usage() {
echo "Usage: ${0##*/} [options] working-dir [run arguments]"
@ -42,7 +41,7 @@ usage() {
orig_argv=("$@")
opts='hKCX:M:S:c:r:w:B:'
opts='hKC:M:S:c:r:w:B:'
while getopts ${opts} arg; do
case "${arg}" in
@ -54,7 +53,6 @@ while getopts ${opts} arg; do
w) mountargs_rw="$OPTARG" ;;
B) build_mirror="$OPTARG" ;;
K) keep_mirrors=true ;;
X) copy_pac_conf=true ;;
h|?) usage ;;
*) error "invalid argument '$arg'"; usage ;;
esac
@ -78,9 +76,7 @@ fi
copy_hostconf () {
cp -a /etc/pacman.d/gnupg "$1/etc/pacman.d"
if ${copy_pac_conf}; then
[[ -n $pac_conf ]] && cp $pac_conf "$1/etc/pacman.conf"
fi
[[ -n $pac_conf ]] && cp $pac_conf "$1/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf"
[[ -n $mirrors_conf ]] && cp ${mirrors_conf} "$1/etc/pacman-mirrors.conf"

View file

@ -21,7 +21,6 @@ working_dir=''
build_locales=false
keep_mirrors=false
keep_flag=''
copy_pac_conf=false
usage() {
echo "Usage: ${0##*/} [options] working-dir package-list..."
@ -40,7 +39,7 @@ usage() {
orig_argv=("$@")
opts='hLKCx:M:S:c:B:'
opts='hLKC:M:S:c:B:'
while getopts ${opts} arg; do
case "${arg}" in
@ -51,7 +50,6 @@ while getopts ${opts} arg; do
L) build_locales=true ;;
B) build_mirror="$OPTARG" ;;
K) keep_mirrors=true; keep_flag='-K' ;;
x) copy_pac_conf=true ;;
h|?) usage ;;
*) error "invalid argument '$arg'"; usage ;;
esac
@ -119,9 +117,8 @@ if ${build_locales};then
fi
chroot_args=(${pac_conf:+-C "$pac_conf"} ${makepkg_conf:+-M "$makepkg_conf"} ${mirrors_conf:+-S "$mirrors_conf"} ${build_mirror:+-B "$build_mirror"} ${cache_dir:+-c "$cache_dir"} ${keep_flag})
${copy_pac_conf} && chroot_args+=(-X)
exec chroot-run \
"${chroot_args[@]}" \
${chroot_args[*]} \
"$working_dir" locale-gen