xbps-src: make -B flag build binpkgs for required pkg deps.

This commit is contained in:
Juan RP 2011-07-18 11:36:48 +02:00
parent 0b348a677c
commit e22c565811
5 changed files with 52 additions and 43 deletions

View file

@ -123,6 +123,15 @@ install_pkg()
remove_tmpl_wrksrc $wrksrc
fi
autoremove_pkg_dependencies $KEEP_AUTODEPS
# Build binary package and update local repo index if
# -B is set.
if [ -n "$BUILD_BINPKG" ]; then
xbps_make_binpkg
[ $? -ne 0 ] && return $?
msg_normal "Updating pkg-index for local repository at:\n"
msg_normal " $XBPS_PACKAGESDIR\n"
${XBPS_REPO_CMD} genindex ${XBPS_PACKAGESDIR} 2>/dev/null
fi
return 0
fi
@ -161,7 +170,17 @@ install_pkg()
# Autoremove packages installed as dependencies if
# XBPS_PREFER_BINPKG_DEPS is set.
#
autoremove_pkg_dependencies $KEEP_AUTODEPS
autoremove_pkg_dependencies $KEEP_AUTODEPS || return $?
# Build binary package and update local repo index if
# -B is set.
if [ -n "$BUILD_BINPKG" ]; then
xbps_make_binpkg
[ $? -ne 0 ] && return $?
msg_normal "Updating pkg-index for local repository at:\n"
msg_normal " $XBPS_PACKAGESDIR\n"
${XBPS_REPO_CMD} genindex ${XBPS_PACKAGESDIR} 2>/dev/null
fi
return $?
}