From 0d2edecb2be14c0ed92a33c7508358d648cd3d2f Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Wed, 3 Jul 2019 05:08:20 -0400 Subject: New upstream version 22 --- pacstrap.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'pacstrap.in') diff --git a/pacstrap.in b/pacstrap.in index b0db8ce..231a154 100644 --- a/pacstrap.in +++ b/pacstrap.in @@ -21,7 +21,7 @@ usage() { usage: ${0##*/} [options] root [packages...] Options: - -C config Use an alternate config file for pacman + -C Use an alternate config file for pacman -c Use the package cache on the host, rather than the target -G Avoid copying the host's pacman keyring to the target -i Prompt for package confirmation when needed (run interactively) @@ -92,18 +92,13 @@ fi # create obligatory directories msg 'Creating install root at %s' "$newroot" -mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc} +mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc/pacman.d} mkdir -m 1777 -p "$newroot"/tmp mkdir -m 0555 -p "$newroot"/{sys,proc} # mount API filesystems chroot_setup "$newroot" || die "failed to setup chroot %s" "$newroot" -msg 'Installing packages to %s' "$newroot" -if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then - die 'Failed to install packages to new root' -fi - if (( copykeyring )); then # if there's a keyring on the host, copy it into the new root, unless it exists already if [[ -d /etc/pacman.d/gnupg && ! -d $newroot/etc/pacman.d/gnupg ]]; then @@ -111,6 +106,11 @@ if (( copykeyring )); then fi fi +msg 'Installing packages to %s' "$newroot" +if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then + die 'Failed to install packages to new root' +fi + if (( copymirrorlist )); then # install the host's mirrorlist onto the new root cp -a /etc/pacman.d/mirrorlist "$newroot/etc/pacman.d/" -- cgit v1.2.3