1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-07-02 14:02:26 +00:00

kiss: fix dependency issue with make depends

This commit is contained in:
Dylan Araps 2021-07-06 19:34:44 +03:00
parent 2d913c45a8
commit d267e2106e
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

27
kiss
View File

@ -426,24 +426,21 @@ pkg_depends() {
die "Circular dependency detected $1 <> ${4##* }" die "Circular dependency detected $1 <> ${4##* }"
esac esac
# Skip traversing over depends files of make dependencies which exist pkg_find "$1"
# in the binary cache.
if [ "$5" != "make" ] || { [ "$5" = "make" ] && ! pkg_cache "$1"; }; then
pkg_find "$1"
! [ -e "$repo_dir/depends" ] || ! [ -e "$repo_dir/depends" ] ||
# Recurse through the dependencies of the child packages. # Recurse through the dependencies of the child packages.
while read -r dep dep_type || [ "$dep" ]; do while read -r dep dep_type || [ "$dep" ]; do
[ "${dep##\#*}" ] || continue [ "${dep##\#*}" ] || continue
pkg_depends "$dep" '' "$3" "$4 $1" "$dep_type" pkg_depends "$dep" '' "$3" "$4 $1" "$dep_type"
done < "$repo_dir/depends" || : done < "$repo_dir/depends" || :
# Add parent to dependencies list.
if [ "$2" != expl ] || { [ "$5" = make ] && ! pkg_cache "$1"; }; then
deps="$deps $1"
fi fi
# After child dependencies are added to the list,
# add the package which depends on them.
[ "$2" = explicit ] || deps="$deps $1"
} }
} }
@ -679,7 +676,7 @@ pkg_build() {
# #
# This also resolves all dependencies and stores the result in '$deps'. # This also resolves all dependencies and stores the result in '$deps'.
for pkg do for pkg do
pkg_depends "$pkg" explicit filter pkg_depends "$pkg" expl filter
explicit="$explicit $pkg " explicit="$explicit $pkg "
done done