aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--doc/pacstrap.8.asciidoc4
-rw-r--r--genfstab.in2
-rw-r--r--pacstrap.in9
4 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4d3cdb2..301eb7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VER=22
+VER=23
PREFIX = /usr/local
diff --git a/doc/pacstrap.8.asciidoc b/doc/pacstrap.8.asciidoc
index 9f25792..c23e8ca 100644
--- a/doc/pacstrap.8.asciidoc
+++ b/doc/pacstrap.8.asciidoc
@@ -36,6 +36,10 @@ Options
*-M*::
Avoid copying the host's mirrorlist to the target.
+*-U*::
+ Use pacman -U to install packages. Useful for obtaining fine-grained
+ control over the installed packages.
+
*-h*::
Output syntax and command line options.
diff --git a/genfstab.in b/genfstab.in
index b8220ea..c626290 100644
--- a/genfstab.in
+++ b/genfstab.in
@@ -220,7 +220,7 @@ done
[[ $device = *'\040(deleted)' ]] && continue
if [[ $type = file ]]; then
- printf '%-20s' "$device"
+ printf '%-20s' "${device#${root%/}}"
elif [[ $device = /dev/dm-+([0-9]) ]]; then
# device mapper doesn't allow characters we need to worry
# about being mangled, and it does the escaping of dashes
diff --git a/pacstrap.in b/pacstrap.in
index 231a154..703df11 100644
--- a/pacstrap.in
+++ b/pacstrap.in
@@ -15,6 +15,7 @@ m4_include(common)
hostcache=0
copykeyring=1
copymirrorlist=1
+pacmode=-Sy
usage() {
cat <<EOF
@@ -26,6 +27,7 @@ usage: ${0##*/} [options] root [packages...]
-G Avoid copying the host's pacman keyring to the target
-i Prompt for package confirmation when needed (run interactively)
-M Avoid copying the host's mirrorlist to the target
+ -U Use pacman -U to install packages
-h Print this help message
@@ -42,7 +44,7 @@ fi
(( EUID == 0 )) || die 'This script must be run with root privileges'
-while getopts ':C:cdGiM' flag; do
+while getopts ':C:cdGiMU' flag; do
case $flag in
C)
pacman_config=$OPTARG
@@ -62,6 +64,9 @@ while getopts ':C:cdGiM' flag; do
M)
copymirrorlist=0
;;
+ U)
+ pacmode=-U
+ ;;
:)
die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG"
;;
@@ -107,7 +112,7 @@ if (( copykeyring )); then
fi
msg 'Installing packages to %s' "$newroot"
-if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then
+if ! unshare --fork --pid pacman -r "$newroot" $pacmode "${pacman_args[@]}"; then
die 'Failed to install packages to new root'
fi