xbps-src: massive rewrite of builddeps resolving code.

This speeds up the process of resolving builddeps with
XBPS_PREFER_BINPKG_DEPS enabled and disabled by ~15% aproximately.

This fixes also some bugs I've found while building a massive rebuild
of all packages with XBPS_PREFER_BINPKG_DEPS enabled.
This commit is contained in:
Juan RP 2011-07-01 17:48:29 +02:00
parent a09089a9b0
commit 5d7873a5b2
5 changed files with 99 additions and 82 deletions

View file

@ -212,12 +212,10 @@ prepare_binpkg_repos()
done
# XBPS utils >= 0.9.0.
msg_normal "Synchronizing index for remote repositories...\n"
${chroot_cmd} ${XBPS_MASTERDIR} sh -c \
"${XBPS_REPO_CMD} -C /usr/local/etc/xbps-conf.plist sync"
${XBPS_REPO_CMD} sync
else
for repo in ${XBPS_REPO_LIST}; do
${chroot_cmd} ${XBPS_MASTERDIR} sh -c \
"${XBPS_REPO_CMD} add ${repo}" 2>/dev/null
${XBPS_REPO_CMD} add ${repo} 2>/dev/null
[ $? -ne 0 ] && \
msg_warn "Failed to sync pkg-index from ${repo}\n"
done