diff options
Diffstat (limited to 'pacstrap.in')
| -rw-r--r-- | pacstrap.in | 14 |
1 files changed, 7 insertions, 7 deletions
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 <config> 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/" |
