From 7e2aaa82e0bb460c85012a098f568dbb196a711e Mon Sep 17 00:00:00 2001 From: "Lucas C. Villa Real" Date: Sun, 1 Jan 2017 20:17:41 -0200 Subject: Remove '-devel' from package names when searching the GoboLinux recipe store. --- bin/InstallPackage-RPM | 10 +++++++--- 1 file 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 } -- cgit v1.1