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.
This commit is contained in:
parent
77d9a764e3
commit
cc08f82ddb
Notes:
sideshowbarker
2024-07-17 16:20:01 +09:00
Author: https://github.com/EWouters Commit: https://github.com/SerenityOS/serenity/commit/cc08f82ddb Pull-request: https://github.com/SerenityOS/serenity/pull/13398 Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue