mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 16:40:07 -07:00
kiss: detect circular dependencies
This commit is contained in:
parent
2c91be99e5
commit
ca8d89021f
5
kiss
5
kiss
@ -415,6 +415,11 @@ pkg_depends() {
|
|||||||
# Recurse through the dependencies of the child packages.
|
# Recurse through the dependencies of the child packages.
|
||||||
[ -f "$repo_dir/depends" ] &&
|
[ -f "$repo_dir/depends" ] &&
|
||||||
while read -r dep _ || [ "$dep" ]; do
|
while read -r dep _ || [ "$dep" ]; do
|
||||||
|
_deps_seen="$_deps_seen $dep"
|
||||||
|
|
||||||
|
contains "$_deps_seen" "$1 $dep $1 $dep $1 $dep" &&
|
||||||
|
die "circular dependency between '$1' and '$dep'"
|
||||||
|
|
||||||
case $dep-$2 in
|
case $dep-$2 in
|
||||||
"$1-$2")
|
"$1-$2")
|
||||||
log "warning: '$1' depends on itself"
|
log "warning: '$1' depends on itself"
|
||||||
|
Loading…
Reference in New Issue
Block a user