diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/deps.sh | 68 | ||||
-rw-r--r-- | lib/metadata.sh | 64 |
2 files changed, 66 insertions, 66 deletions
diff --git a/lib/deps.sh b/lib/deps.sh index 64ca116..e38680a 100644 --- a/lib/deps.sh +++ b/lib/deps.sh @@ -147,12 +147,12 @@ ob_parse_dep() eval ${_obpd_comp_var}=\"\$\{_obpd_${_obpd_comp}\}\" done - if [ -n "${_obpd_host_arch}" ] && ! _ob_dep_arch_is_concerned \ + if [ -n "${_obpd_host_arch}" ] && ! ob_arch_is_concerned \ "${_obpd_host_arch}" "${_obpd_arches}"; then _ob_return 0 return ${?} fi - if [ -n "${_obpd_host_plat}" ] && ! _ob_dep_plat_is_concerned \ + if [ -n "${_obpd_host_plat}" ] && ! ob_plat_is_concerned \ "${_obpd_host_plat}" "${_obpd_plats}"; then _ob_return 0 return ${?} @@ -245,67 +245,3 @@ ob_reduce_deps() _ob_return 0 return ${?} } - -_ob_dep_arch_is_concerned() -{ - _ob_local _obdaic_host_arch _obdaic_arches \ - _obdaic_arch _obdaic_not_arch _obdaic_seen_arch - - _obdaic_host_arch="${1}" - _obdaic_arches="${2}" - _obdaic_seen_arch=1 - - if [ -z "${_obdaic_arches}" ]; then - _obdaic_seen_arch=0 - fi - - for _obdaic_arch in ${_obdaic_arches}; do - _obdaic_not_arch="${_obdaic_arch#!}" - if [ "${_obdaic_not_arch}" != "${_obdaic_arch}" ]; then - if ob_match_arch "${_obdaic_host_arch}" "${_obdaic_not_arch}"; then - _obdaic_seen_arch=1 - break - else - _obdaic_seen_arch=0 - fi - elif ob_match_arch "${_obdaic_host_arch}" "${_obdaic_arch}"; then - _obdaic_seen_arch=0 - break - fi - done - - _ob_return ${_obdaic_seen_arch} - return ${?} -} - -_ob_dep_plat_is_concerned() -{ - _ob_local _obdpic_host_plat _obdpic_plats \ - _obdpic_plat _obdpic_not_plat _obdpic_seen_plat - - _obdpic_host_plat="${1}" - _obdpic_plats="${2}" - _obdpic_seen_plat=1 - - if [ -z "${_obdpic_plats}" ]; then - _obdpic_seen_plat=0 - fi - - for _obdpic_plat in ${_obdpic_plats}; do - _obdpic_not_plat="${_obdpic_plat#!}" - if [ "${_obdpic_not_plat}" != "${_obdpic_plat}" ]; then - if ob_match_plat "${_obdpic_host_plat}" "${_obdpic_not_plat}"; then - _obdpic_seen_plat=1 - break - else - _obdpic_seen_plat=0 - fi - elif ob_match_plat "${_obdpic_host_plat}" "${_obdpic_plat}"; then - _obdpic_seen_plat=0 - break - fi - done - - _ob_return ${_obdpic_seen_plat} - return ${?} -} diff --git a/lib/metadata.sh b/lib/metadata.sh index 0680b6a..d197083 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -218,6 +218,70 @@ ob_match_plat() return ${?} } +ob_arch_is_concerned() +{ + _ob_local _obaic_host_arch _obaic_arches \ + _obaic_arch _obaic_not_arch _obaic_seen_arch + + _obaic_host_arch="${1}" + _obaic_arches="${2}" + _obaic_seen_arch=1 + + if [ -z "${_obaic_arches}" ]; then + _obaic_seen_arch=0 + fi + + for _obaic_arch in ${_obaic_arches}; do + _obaic_not_arch="${_obaic_arch#!}" + if [ "${_obaic_not_arch}" != "${_obaic_arch}" ]; then + if ob_match_arch "${_obaic_host_arch}" "${_obaic_not_arch}"; then + _obaic_seen_arch=1 + break + else + _obaic_seen_arch=0 + fi + elif ob_match_arch "${_obaic_host_arch}" "${_obaic_arch}"; then + _obaic_seen_arch=0 + break + fi + done + + _ob_return ${_obaic_seen_arch} + return ${?} +} + +ob_plat_is_concerned() +{ + _ob_local _obpic_host_plat _obpic_plats \ + _obpic_plat _obpic_not_plat _obpic_seen_plat + + _obpic_host_plat="${1}" + _obpic_plats="${2}" + _obpic_seen_plat=1 + + if [ -z "${_obpic_plats}" ]; then + _obpic_seen_plat=0 + fi + + for _obpic_plat in ${_obpic_plats}; do + _obpic_not_plat="${_obpic_plat#!}" + if [ "${_obpic_not_plat}" != "${_obpic_plat}" ]; then + if ob_match_plat "${_obpic_host_plat}" "${_obpic_not_plat}"; then + _obpic_seen_plat=1 + break + else + _obpic_seen_plat=0 + fi + elif ob_match_plat "${_obpic_host_plat}" "${_obpic_plat}"; then + _obpic_seen_plat=0 + break + fi + done + + _ob_return ${_obpic_seen_plat} + return ${?} +} + ob_get_system_path() { _ob_local _obgsp_path_id |