From cc08f82ddb104829112c7c5fe028f2e7dd9aaee1 Mon Sep 17 00:00:00 2001 From: EWouters <6179932+EWouters@users.noreply.github.com> Date: Fri, 1 Apr 2022 07:06:19 +0200 Subject: [PATCH] Ports: Fix dependency install when port name is not port folder name There was a bug in the way the `.port_include.sh` script handled installing dependencies. According to the [documentation](https://github.com/SerenityOS/serenity/tree/master/Ports#depends) the depends array should have port names in it. The port system allows for the name of the port to be different from the folder where port lives. Previously the `installdepends` function would cd to the name of the port, now it will find and run the `package.sh` that has the line `port=$depend` in it. --- Ports/.port_include.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 8248485e9d..e61a2bb5ad 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -491,7 +491,7 @@ package_install_state() { installdepends() { for depend in "${depends[@]}"; do if [ -z "$(package_install_state $depend)" ]; then - (cd "../$depend" && ./package.sh --auto) + (cd "$(dirname $(grep -E port=${depend} ../*/package.sh))" && ./package.sh --auto) fi done }