aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas C. Villa Real <lucasvr@gmail.com>2017-01-01 20:17:41 -0200
committerLucas C. Villa Real <lucasvr@gmail.com>2017-01-01 20:17:41 -0200
commit7e2aaa82e0bb460c85012a098f568dbb196a711e (patch)
tree69d791855c9cfbcb5a6c1775ab6ea6664a339897
parent48c81d606952cc9e916764c51053f8bd4fc6c9c6 (diff)
downloadThirdPartyInstallers-7e2aaa82e0bb460c85012a098f568dbb196a711e.tar.xz
Remove '-devel' from package names when searching the GoboLinux recipe
store.
-rwxr-xr-xbin/InstallPackage-RPM10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/InstallPackage-RPM b/bin/InstallPackage-RPM
index 7b11706..07f0793 100755
--- a/bin/InstallPackage-RPM
+++ b/bin/InstallPackage-RPM
@@ -383,11 +383,14 @@ function lookup_pkgname() {
local dependency="$1"
local pkgname=$(echo "$dependency" | cut -d'(' -f1)
+ # GoboLinux doesn't have "devel" packages like most mainstream distros do
+ local goboname=$(echo "$pkgname" | sed 's,-devel$,,g')
+
# Do we have a GoboLinux package installed with a matching name?
for testname in $(ls $goboPrograms/)
do
# Case-insensitive comparison (requires Bash 4)
- if [ "${testname,,}" = "${pkgname,,}" ]
+ if [ "${testname,,}" = "${pkgname,,}" ] || [ "${testname,,}" = "${goboname,,}" ]
then
echo "$testname" && return 0
fi
@@ -396,7 +399,8 @@ function lookup_pkgname() {
# Query the GoboLinux recipe store.
if ! Boolean "no-web"
then
- local recipeurl=$(FindPackage -t recipe "${pkgname}")
+
+ local recipeurl=$(FindPackage -t recipe "${pkgname}" || FindPackage -t recipe "${goboname}")
if [ "$recipeurl" ]
then
# TODO we're potentially discarding the wanted version(s) of the given dep
@@ -404,7 +408,7 @@ function lookup_pkgname() {
fi
fi
- # TODO Query the remote RPM database
+ # TODO Query the remote RPM database for $pkgname
return 1
}