Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/mkarchroot.in
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-11-06 10:27:55 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-11-06 10:27:55 +0100
commita030cdc532269521eba07c57137760a969e788a4 (patch)
tree6cd51607ce3fe70ac1a9a56a779c728cd02ed2bf /mkarchroot.in
parentb7a3c74c5036a9f829aab478fc8c5be146b79ce3 (diff)
mkarchroot: Respect makepkg.conf and pacman.conf when running a command
Diffstat (limited to 'mkarchroot.in')
-rw-r--r--mkarchroot.in18
1 files changed, 10 insertions, 8 deletions
diff --git a/mkarchroot.in b/mkarchroot.in
index 6238979..c35ba5b 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -129,6 +129,14 @@ copy_hostconf () {
chroot "${working_dir}" /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS > "${working_dir}/etc/mtab"
cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
echo "Server = ${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist
+
+ if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then
+ cp ${pac_conf} ${working_dir}/etc/pacman.conf
+ fi
+
+ if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then
+ cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf
+ fi
}
chroot_umount () {
@@ -206,19 +214,13 @@ else
ldconfig -r "${working_dir}"
fi
- if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then
- cp ${pac_conf} ${working_dir}/etc/pacman.conf
- fi
-
- if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then
- cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf
- fi
-
if [ -e "${working_dir}/etc/locale.gen" ]; then
sed -i 's@^#\(en_US\|de_DE\)\(\.UTF-8\)@\1\2@' "${working_dir}/etc/locale.gen"
chroot "${working_dir}" /usr/sbin/locale-gen
fi
+ copy_hostconf
+
if [ ! -e "${working_dir}/.arch-chroot" ]; then
date +%s > "${working_dir}/.arch-chroot"
fi