diff options
Diffstat (limited to 'common/xbps-src/shutils/show.sh')
-rw-r--r-- | common/xbps-src/shutils/show.sh | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index 67b2ec14810..e2fc956514e 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -61,22 +61,44 @@ show_avail() { } show_pkg_build_depends() { - local f x _pkgname _srcpkg found result + local f x _pkgname _srcpkg _dep found result local _deps="$1" result=$(mktemp) || exit 1 # build time deps for f in ${_deps}; do + # ignore virtual deps + local _rpkg="${f%\?*}" + local _vpkg="${f#*\?}" + # ignore virtual dependencies - [[ ${f%\?*} != ${f#*\?} ]] && f=${f#*\?} + if [ "${_rpkg}" != "${_vpkg}" ]; then + f="${_vpkg}" + fi unset found # check for subpkgs for x in ${subpackages}; do - [[ $f == $x ]] && found=1 && break + _pkgname="$($XBPS_UHELPER_CMD getpkgdepname $f 2>/dev/null)" + if [ -z "${_pkgname}" ]; then + _pkgname="$($XBPS_UHELPER_CMD getpkgname $f 2>/dev/null)" + fi + if [ "${_pkgname}" = "$x" ]; then + found=1 + break + fi done - [[ $found ]] && continue - _pkgname=${f/-32bit} + if [ -n "$found" ]; then + continue + fi + _pkgname="$($XBPS_UHELPER_CMD getpkgdepname $f 2>/dev/null)" + if [ -z "${_pkgname}" ]; then + _pkgname="$($XBPS_UHELPER_CMD getpkgname $f 2>/dev/null)" + fi + if [ -z "${_pkgname}" ]; then + _pkgname="$f" + fi + _pkgname=${_pkgname/-32bit} _srcpkg=$(readlink -f ${XBPS_SRCPKGDIR}/${_pkgname}) _srcpkg=${_srcpkg##*/} echo "${_srcpkg}" >> $result @@ -86,15 +108,18 @@ show_pkg_build_depends() { } show_pkg_build_deps() { - show_pkg_build_depends "${hostmakedepends} ${makedepends} $(setup_pkg_depends '' 1)" + setup_pkg_depends + show_pkg_build_depends "${host_build_depends} ${build_depends} ${run_depends}" } show_pkg_hostmakedepends() { - show_pkg_build_depends "${hostmakedepends}" + setup_pkg_depends + show_pkg_build_depends "${host_build_depends}" } show_pkg_makedepends() { - show_pkg_build_depends "${makedepends}" + setup_pkg_depends + show_pkg_build_depends "${build_depends}" } show_pkg_build_options() { |