Permalink
Browse files

improved arch packages detection, fix #1770

  • Loading branch information...
mpapis committed Apr 7, 2013
1 parent bf24ae2 commit 949f2a1708fa99b389af7c72c8bfd4fd7ae17322
Showing with 32 additions and 5 deletions.
  1. +30 −3 scripts/functions/build_requirements
  2. +2 −2 scripts/functions/requirements/arch
@@ -145,6 +145,27 @@ __rvm_filter_installed_packages_reset()
packages_to_install=()
}
__rvm_filter_installed_package_from_missing()
{
packages_missing=( $( "$@" ) )
shift # remove callback function name
typeset __package
for __package
do
[[ " ${packages_missing[*]} " =~ " ${__package} " ]] || packages_installed+=( "${__package}" )
done
case "$rvm_autolibs_flag_number" in
(0|1|2) # just ignore
true
;;
(*) # 2+
packages_to_install=( "${packages_missing[@]}" )
packages_missing=()
;;
esac
}
__rvm_filter_installed_package_check()
{
if
@@ -196,9 +217,15 @@ __rvm_filter_installed_packages()
shift
__rvm_filter_installed_packages_reset
for _package_name
do __rvm_filter_installed_package_check "${_package_installed_cmd}" "${_package_name}"
done
if
is_a_function "${_package_installed_cmd}_all_missing" "$@"
then
__rvm_filter_installed_package_from_missing "${_package_installed_cmd}_all_missing" "$@"
else
for _package_name
do __rvm_filter_installed_package_check "${_package_installed_cmd}" "${_package_name}"
done
fi
__rvm_filter_installed_packages_summary || return $?
__rvm_filter_installed_packages_install "${_package_install_cmd}"
}
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
requirements_arch_lib_installed()
requirements_arch_lib_installed_all_missing()
{
pacman -Q "${1}" >/dev/null || return $?
pacman -T "$@" >/dev/null || true
}
requirements_arch_libs_install()

0 comments on commit 949f2a1

Please sign in to comment.