aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas C. Villa Real <lucasvr@gobolinux.org>2018-07-04 13:11:56 -0300
committerLucas C. Villa Real <lucasvr@gobolinux.org>2018-07-04 13:11:56 -0300
commitb9b84e6dbe1bcc9286163139989e4e69580b23e6 (patch)
tree4ebce61fbd65f842f2f358347dcf2470b72678f5
parent7af5955bb84a436de0a623642c4d3a73e1c2ed98 (diff)
downloadThirdPartyInstallers-b9b84e6dbe1bcc9286163139989e4e69580b23e6.tar.xz
As a fallback, include symbols when searching by path/filename on rpmfind.net
-rwxr-xr-xbin/ThirdPartyInstaller43
1 files changed, 28 insertions, 15 deletions
diff --git a/bin/ThirdPartyInstaller b/bin/ThirdPartyInstaller
index 964656e..4b3d2ed 100755
--- a/bin/ThirdPartyInstaller
+++ b/bin/ThirdPartyInstaller
@@ -220,8 +220,14 @@ function populate_dependencies() {
wantedsymbol=$(echo "$dependency" | cut -d'(' -f2 | cut -d')' -f1)
depinfo=$(take_dependency_from_path "$inputfile" "$goboLibraries/$libname" "$wantedsymbol")
if [ "$depinfo" ]
- then echo "$depinfo"
- else echo "# Unresolved path-based library dependency: $dependency"
+ then
+ echo "$depinfo"
+ else
+ depinfo=$(lookup_pkgname "$inputfile" "$dependency")
+ if [ "$depinfo" ]
+ then echo "$depinfo"
+ else echo "# Unresolved path-based library dependency: $dependency"
+ fi
fi
elif is_basic_symbol "$dependency"
then
@@ -407,21 +413,28 @@ function lookup_pkgname() {
echo "$(basename $recipeurl | sed 's,\(.*\)--.*--.*,\1,g')" && return 0
fi
- # Query the remote database for $pkgname
- Log_Normal "Searching the remote $(thirdparty_backend) database for the package providing $pkgname"
- local arch=$(thirdparty_arch "$inputfile")
- local distro=$(thirdparty_distribution_name "$inputfile")
- local distrocode=$(thirdparty_distribution_code "$inputfile")
- local depname=$(thirdparty_search_remotedb "$pkgname" "$arch" "$distro" "$distrocode")
- if [ "$depname" ]
- then
- local originalname=$(echo $depname | cut -d" " -f1)
- local prettyname="$(pretty_name $originalname)"
- local result=$(echo "$depname" | sed "s,$originalname,$prettyname,1")
- Log_Verbose "$result"
- echo "$result" && return 0
+ # Query the remote database for $pkgnames
+ if [ "$pkgname" != "$dependency" ]
+ then pkgnames=( "$pkgname" "$dependency" )
+ else pkgnames=( "$pkgname" )
fi
+ for pkgname_to_search in "${pkgnames[@]}"
+ do
+ Log_Normal "Searching the remote $(thirdparty_backend) database for the package providing $pkgname_to_search"
+ local arch=$(thirdparty_arch "$inputfile")
+ local distro=$(thirdparty_distribution_name "$inputfile")
+ local distrocode=$(thirdparty_distribution_code "$inputfile")
+ local depname=$(thirdparty_search_remotedb "$pkgname_to_search" "$arch" "$distro" "$distrocode")
+ if [ "$depname" ]
+ then
+ local originalname=$(echo $depname | cut -d" " -f1)
+ local prettyname="$(pretty_name $originalname)"
+ local result=$(echo "$depname" | sed "s,$originalname,$prettyname,1")
+ Log_Verbose "$result"
+ echo "$result" && return 0
+ fi
+ done
return 1
}