xbps-src: improve XBPS_PREFER_BINPKG_DEPS code.
This commit is contained in:
parent
bcbfb0c63c
commit
a461919eea
|
@ -183,23 +183,17 @@ create_binsh_symlink()
|
|||
|
||||
prepare_binpkg_repos()
|
||||
{
|
||||
local repo
|
||||
local repo xver
|
||||
|
||||
if [ ! -f "$XBPS_MASTERDIR/.xbps_added_local_repo" ]; then
|
||||
if [ ! -f ${XBPS_PACKAGESDIR}/${xbps_machine}/pkg-index.plist ]; then
|
||||
:
|
||||
else
|
||||
msg_normal "Registering local repository...\n"
|
||||
${chroot_cmd} $XBPS_MASTERDIR \
|
||||
${XBPS_REPO_CMD} add /xbps_packagesdir 2>/dev/null
|
||||
[ $? -eq 0 ] && touch -f \
|
||||
$XBPS_MASTERDIR/.xbps_added_local_repo
|
||||
fi
|
||||
fi
|
||||
# Check for xbps utils >= 0.9.0.
|
||||
xver=$($XBPS_PKGDB_CMD -V|awk '{print $2}')
|
||||
for repo in ${XBPS_REPO_LIST}; do
|
||||
${chroot_cmd} ${XBPS_MASTERDIR} ${XBPS_REPO_CMD} \
|
||||
add ${repo} 2>/dev/null
|
||||
[ $? -ne 0 ] && msg_warn "Failed to sync pkg-index from ${repo}\n"
|
||||
if [ -z "$xver" -o "$xver" = "" ]; then
|
||||
${chroot_cmd} ${XBPS_MASTERDIR} ${XBPS_REPO_CMD} \
|
||||
add ${repo} 2>/dev/null
|
||||
[ $? -ne 0 ] && \
|
||||
msg_warn "Failed to sync pkg-index from ${repo}\n"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue