diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-09 07:42:09 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-09 08:49:12 (EST) |
commit | da9e4a8a322311b51f6835fe62a1a80d56ae621b (patch) | |
tree | 9d2ee25d7605db8d7dc48d86776aea949cafe8cc | |
parent | a21cbd9795914134525b343e1a6e7c3cfd0eccaa (diff) |
resolve_deps(): Fix infinite loop
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/deps.sh | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -32,6 +32,7 @@ Error handling and bug fixes: usable within the root being installed. ProteanOS's busybox 1.32.0-1 manages "cut" and almost all other utility links using update-alternatives, so they aren't usable until after installation. + * A potential infinite loop in the dependency solver has been fixed. ProteanOS Development Kit version 2.0.1 --------------------------------------- diff --git a/src/deps.sh b/src/deps.sh index 25c2cf7..72a0cda 100644 --- a/src/deps.sh +++ b/src/deps.sh @@ -28,7 +28,7 @@ resolve_deps() local pkg= all_deps='' - new_pkgs="${new_pkgs} " + new_pkgs=" $(printf '%s ' ${new_pkgs})" while [ "x${new_pkgs}" != 'x' ]; do all_deps="${all_deps}${new_pkgs}" new_deps='' @@ -42,7 +42,7 @@ resolve_deps() new_deps="$(printf '%s\n' ${new_deps} | sort -u)" new_pkgs='' for pkg in ${new_deps}; do - if [ "x${all_deps# ${pkg} }" = "x${all_deps}" ]; then + if [ "x${all_deps#* ${pkg} }" = "x${all_deps}" ]; then new_pkgs="${new_pkgs}${pkg} " fi done |