diff options
author | Lucas C. Villa Real <lucasvr@gobolinux.org> | 2018-07-04 09:11:01 -0300 |
---|---|---|
committer | Lucas C. Villa Real <lucasvr@gobolinux.org> | 2018-07-04 09:11:01 -0300 |
commit | 876662ecb64e392422b8c56fa52c6ec84b8f4871 (patch) | |
tree | bcfb8b89ae32fbe83faaf8294f41aa6bab56b9ba /bin/ThirdPartyInstaller | |
parent | eb2c131e7cc9ff32bc9864b3e8e5c8a040687e33 (diff) | |
download | ThirdPartyInstallers-876662ecb64e392422b8c56fa52c6ec84b8f4871.tar.xz |
Pick the most recent version if more than one package matches the
version-based filter embedded in the rpm dependency field.
Diffstat (limited to 'bin/ThirdPartyInstaller')
-rwxr-xr-x | bin/ThirdPartyInstaller | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/ThirdPartyInstaller b/bin/ThirdPartyInstaller index 9916521..6c0a4ee 100755 --- a/bin/ThirdPartyInstaller +++ b/bin/ThirdPartyInstaller @@ -362,7 +362,7 @@ function take_dependency_from_path() { # What we do now is to query remote RPM/DEB databases to find which package hosts the # dependency file. - Log_Normal "Searching the remote $(thirdparty_backend) database for the package hosting $originalpath" + Log_Normal "Searching the remote $(thirdparty_backend) database for the package providing $originalpath" depname=$(thirdparty_search_remotedb "$originalpath" "$arch" "$distro" "$distrocode") if [ "$depname" ] then @@ -401,14 +401,18 @@ function lookup_pkgname() { fi # Query the remote database for $pkgname - Log_Normal "Searching the remote $(thirdparty_backend) database for the package hosting $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 - echo "$depname" && return 0 + local originalname=$(echo $depname | cut -d" " -f1) + local prettyname="$(GuessProgramCase $originalname)" + local result=$(echo "$depname" | sed "s,$originalname,$prettyname,1") + Log_Verbose "$result" + echo "$result" && return 0 fi return 1 |