aboutsummaryrefslogtreecommitdiff
path: root/auria.sh
diff options
context:
space:
mode:
Diffstat (limited to 'auria.sh')
-rwxr-xr-xauria.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/auria.sh b/auria.sh
index d7bbfc3..c8da53b 100755
--- a/auria.sh
+++ b/auria.sh
@@ -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"); } \