aboutsummaryrefslogtreecommitdiffstats
path: root/pacstrap.in
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-07-03 05:08:22 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-07-03 05:08:22 -0400
commit1907d1037c2e5d98b8b55b563d7b0ce8cd4b408a (patch)
treed704c14acf3b6dd56a482dc30c730aea6eafa734 /pacstrap.in
parentad1be39ef1dc25f2fe3a2f41a931d8e734cbeb76 (diff)
parent0d2edecb2be14c0ed92a33c7508358d648cd3d2f (diff)
Update upstream source from tag 'upstream/22'
Update to upstream version '22' with Debian dir 76cf8a8f0842846234438b4170eb5cf1a638e775
Diffstat (limited to 'pacstrap.in')
-rw-r--r--pacstrap.in14
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/"