xbps-src: improve PREFER_BINPKG_DEPS, take 2.

When installing pkgdeps from repositories more errno values are handled
from xbps-bin, this help us to find why a package failed to install.

Also stdout/stderr output from xbps-bin is redirected to
$wrksrc/.xbps_install_dependency_$pkgdepname.log to see how it was
installed or why it failed to install.

Do autoremove packages in more places to be sure that if something went
wrong those packages are always removed.
This commit is contained in:
Juan RP 2011-06-30 10:23:48 +02:00
parent 9be28af618
commit 87f2599c17
3 changed files with 63 additions and 49 deletions

View file

@ -70,15 +70,9 @@ remove_pkgdestdir_sighandler()
rm -rf "$XBPS_DESTDIR/${sourcepkg}-${version%_*}"
fi
msg_red "'${sourcepkg}-${lver}': removed files from DESTDIR...\n"
#
# If XBPS_PREFER_BINPKG_DEPS is set, we should remove those
# package dependencies installed by the target package, do it.
#
if [ -n "$XBPS_PREFER_BINPKG_DEPS" -a -z "$base_chroot" ]; then
msg_normal "Removing binary package dependencies...\n"
${fakeroot_cmd} ${fakeroot_cmd_args} \
${XBPS_BIN_CMD} -Rpyf autoremove
fi
. ${XBPS_SHUTILSDIR}/builddep_funcs.sh
autoremove_binpkgs
}
var_is_a_function()