diff options
author | Einhard Leichtfuß <alguien@respiranto.de> | 2018-11-29 21:01:30 +0100 |
---|---|---|
committer | Einhard Leichtfuß <alguien@respiranto.de> | 2018-11-29 21:01:30 +0100 |
commit | 0c3e80bf655d57e23d3a27ce2ca193bc02f76eaa (patch) | |
tree | 2093f94b276755f04064716c12a2f0584cf9512b /auria.sh | |
parent | 9ff096d2523060e1cc594389e0098dc77ed830a6 (diff) |
Properly differentiate between local and repository pkgs
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"); } \ |