diff options
Diffstat (limited to 'auria.sh')
-rwxr-xr-x | auria.sh | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -528,10 +528,11 @@ function resolve_deps # This does also populate the $repo_deps array. if [[ "$itype" == dep ]] then - depsearch_noaur "$pkg" "$pkgstr" && return 0 + depsearch_local "$pkgstr" && return 0 + depsearch_repos "$pkg" "$pkgstr" && return 0 elif [[ "$itype" == update ]] then - if depsearch_noaur "$pkg" "$pkgstr" + if depsearch_repos "$pkg" "$pkgstr" then inform "$pkgstr exists in the regular repositories." ask n "Try to update from AUR anyways" || return 0 @@ -670,9 +671,17 @@ function install_deptree done } +# $1 package: name [. pkgver-comparator . version string] +# returns result: (0|1) +function depsearch_local +{ + qpacman -T "$1" +} + # $1 package: name # $2 package: name [. pkgver-comparator . version string] -function depsearch_noaur +# returns result: (0|1) +function depsearch_repos { local pkg pkgstr pkg="$1" @@ -681,9 +690,6 @@ function depsearch_noaur # In case of no dep restriction, look up in list first. [[ "$pkg" == "$pkgstr" ]] && match "$pkg" "${repo_deps[@]}" && return 0 - # Search locally. - qpacman -T "$pkgstr" && return 0 - # Search in the repos. qpacman -Sp "$pkgstr" \ && { match "$pkg" "${repo_deps[@]}" || repo_deps+=("$pkg"); } \ |