From 710cb14c6248d26565ff6a5a31a7fc4f76d276e9 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Wed, 22 Aug 2012 14:08:25 -0300 Subject: Fixed infinite loop and base creation --- newroot | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'newroot') 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 $@ -- cgit v1.2.3-54-g00ecf