xbps-src/bulk: simplify and make the toposort work again.

This commit is contained in:
Juan RP 2015-04-07 12:34:23 +02:00
parent 66f6780b31
commit 6d465e0a43

View file

@ -42,11 +42,7 @@ bulk_build() {
# Perform a topological sort of all pkgs but only with build dependencies # Perform a topological sort of all pkgs but only with build dependencies
# that are found in previous step. # that are found in previous step.
for pkg in ${pkgs}; do for pkg in ${pkgs}; do
for x in ${XBPS_COMMONDIR}/environment/setup/*.sh; do _pkgs="$(./xbps-src show-build-deps $pkg 2>/dev/null)"
. $x
done
. ${XBPS_SRCPKGDIR}/${pkg}/template
_pkgs="$(show_pkg_build_deps 2>/dev/null| sed -e 's|[<>].*\$||g')"
found=0 found=0
for x in ${_pkgs}; do for x in ${_pkgs}; do
_pkg=$(bulk_getlink $x) _pkg=$(bulk_getlink $x)
@ -60,7 +56,7 @@ bulk_build() {
done done
[ $found -eq 0 ] && echo "${pkg} ${pkg}" >> $tmpf [ $found -eq 0 ] && echo "${pkg} ${pkg}" >> $tmpf
done done
tsort $tmpf tsort $tmpf|tac
rm -f $tmpf rm -f $tmpf
} }