summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-22 14:08:25 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-22 14:08:25 -0300
commit710cb14c6248d26565ff6a5a31a7fc4f76d276e9 (patch)
tree8e30acd598a55e540856cd891951eb607df560e7
parent2dd17dbe005b9d87a1d629e8fb029ae10f493790 (diff)
Fixed infinite loop and base creation
-rwxr-xr-xnewroot16
1 files changed, 10 insertions, 6 deletions
diff --git a/newroot b/newroot
index dff1003..acf84c6 100755
--- a/newroot
+++ b/newroot
@@ -36,14 +36,18 @@ PACCACHE="${PACCACHE:-/var/cache/pacman/pkg}"
export WORKDIR LOGFILE PACCACHE
function pacman() {
- pacman -r "${WORKDIR}" \
- --logfile "${LOGFILE}" \
- --noconfirm \
- --cachedir "${PACCACHE}" \
- --config /etc/pacman.conf $@
+ /usr/bin/pacman -r "${WORKDIR}" \
+ --dbpath "${WORKDIR}"/var/lib/pacman \
+ --logfile "${LOGFILE}" \
+ --noconfirm \
+ --needed \
+ --cachedir "${PACCACHE}" \
+ --config /etc/pacman.conf $@
}
# Bootstrap!
mkdir -p "${WORKDIR}"/var/lib/pacman
-pacman -Sy base ${@}
+# We need to do this twice or the install won't find the databases
+pacman -Sy
+pacman -S base $@