xbps-src: for runtime deps (depends) do not resolve vpkgs.

...otherwise the following would happen:

	- foo depends on musl
	- musl is provided by cross-vpkg-dummy
	- musl is then detected as resolved and it's not built.
This commit is contained in:
Juan RP 2014-09-21 11:44:45 +02:00
parent dbde6e849e
commit 8063adde71

View file

@ -135,7 +135,7 @@ install_pkg_from_repos() {
# package, 1 if no match and 2 if not installed. # package, 1 if no match and 2 if not installed.
# #
check_pkgdep_matched() { check_pkgdep_matched() {
local pkg="$1" cross="$2" uhelper= pkgn= iver= local pkg="$1" checkver="$2" cross="$3" uhelper= pkgn= iver=
[ "$build_style" = "meta" ] && return 2 [ "$build_style" = "meta" ] && return 2
[ -z "$pkg" ] && return 255 [ -z "$pkg" ] && return 255
@ -152,7 +152,7 @@ check_pkgdep_matched() {
uhelper="$XBPS_UHELPER_CMD" uhelper="$XBPS_UHELPER_CMD"
fi fi
iver="$($uhelper version $pkgn)" iver="$($uhelper $checkver $pkgn)"
if [ $? -eq 0 -a -n "$iver" ]; then if [ $? -eq 0 -a -n "$iver" ]; then
$XBPS_UHELPER_CMD pkgmatch "${pkgn}-${iver}" "${pkg}" $XBPS_UHELPER_CMD pkgmatch "${pkgn}-${iver}" "${pkg}"
[ $? -eq 1 ] && return 0 [ $? -eq 1 ] && return 0
@ -195,7 +195,7 @@ check_installed_pkg() {
# #
install_pkg_deps() { install_pkg_deps() {
local pkg="$1" cross="$2" rval _realpkg curpkgdepname pkgn iver _props _exact local pkg="$1" cross="$2" rval _realpkg curpkgdepname pkgn iver _props _exact
local i j found rundep local i j found rundep checkver
local -a host_binpkg_deps binpkg_deps local -a host_binpkg_deps binpkg_deps
local -a host_missing_deps missing_deps local -a host_missing_deps missing_deps
@ -223,7 +223,7 @@ install_pkg_deps() {
fi fi
_exact=1 _exact=1
fi fi
check_pkgdep_matched "${_realpkg}" check_pkgdep_matched "${_realpkg}" version
local rval=$? local rval=$?
if [ $rval -eq 0 ]; then if [ $rval -eq 0 ]; then
iver=$($XBPS_UHELPER_CMD version "${pkgn}") iver=$($XBPS_UHELPER_CMD version "${pkgn}")
@ -267,7 +267,11 @@ install_pkg_deps() {
# Target build dependencies. # Target build dependencies.
# #
for i in ${build_depends} "RDEPS" ${run_depends}; do for i in ${build_depends} "RDEPS" ${run_depends}; do
[ "$i" = "RDEPS" ] && rundep="runtime" && continue if [ "$i" = "RDEPS" ]; then
rundep="runtime"
checkver="real-version"
continue
fi
_realpkg="${i%\?*}" _realpkg="${i%\?*}"
if [ "${_realpkg}" = "virtual" ]; then if [ "${_realpkg}" = "virtual" ]; then
# ignore virtual dependencies # ignore virtual dependencies
@ -288,16 +292,16 @@ install_pkg_deps() {
[ "$j" = "$pkgn" ] && found=1 && break [ "$j" = "$pkgn" ] && found=1 && break
done done
[ -n "$found" ] && continue [ -n "$found" ] && continue
check_pkgdep_matched "${_realpkg}" $cross check_pkgdep_matched "${_realpkg}" $checkver $cross
local rval=$? local rval=$?
if [ $rval -eq 0 ]; then if [ $rval -eq 0 ]; then
iver=$($XBPS_UHELPER_XCMD version "${pkgn}") iver=$($XBPS_UHELPER_XCMD ${checkver:-version} "${pkgn}")
if [ $? -eq 0 -a -n "$iver" ]; then if [ $? -eq 0 -a -n "$iver" ]; then
echo " [${rundep:-target}] ${_realpkg}: found '$pkgn-$iver'." echo " [${rundep:-target}] ${_realpkg}: found '$pkgn-$iver'."
continue continue
fi fi
elif [ $rval -eq 1 ]; then elif [ $rval -eq 1 ]; then
iver=$($XBPS_UHELPER_XCMD version "${pkgn}") iver=$($XBPS_UHELPER_XCMD ${checkver:-version} "${pkgn}")
if [ $? -eq 0 -a -n "$iver" ]; then if [ $? -eq 0 -a -n "$iver" ]; then
echo " [${rundep:-target}] ${_realpkg}: installed ${iver} (unresolved) removing..." echo " [${rundep:-target}] ${_realpkg}: installed ${iver} (unresolved) removing..."
$XBPS_REMOVE_XCMD -iyf $pkgn >/dev/null 2>&1 $XBPS_REMOVE_XCMD -iyf $pkgn >/dev/null 2>&1