summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-05-06 21:02:07 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-05-06 21:02:07 +0000
commit072e93458d554ee22c74c97a3b23d0a24d99d0c9 (patch)
tree3778e8adf917096aef62a5f68e2d5706cd5008ef
parent92417870e61f83d2ae4d4d4c7f0931461d3b9c58 (diff)
downloadabuild-072e93458d554ee22c74c97a3b23d0a24d99d0c9.tar.gz
abuild-072e93458d554ee22c74c97a3b23d0a24d99d0c9.tar.bz2
abuild-072e93458d554ee22c74c97a3b23d0a24d99d0c9.tar.xz
abuild-072e93458d554ee22c74c97a3b23d0a24d99d0c9.zip
abuild: break circular deps when building recursively
-rwxr-xr-xabuild.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/abuild.in b/abuild.in
index 3fea58a..21b1b43 100755
--- a/abuild.in
+++ b/abuild.in
@@ -820,7 +820,7 @@ builddeps() {
if [ "${i#\!}" != "$i" ]; then
list_has ${i#\!} $installed_deps \
&& conflicts="$conflicts ${i#\!}"
- elif ! deplist_has $i $installed_deps; then
+ elif ! deplist_has $i $installed_deps || [ -n "$upgrade" ]; then
missing="$missing $i"
fi
done
@@ -863,11 +863,17 @@ builddeps() {
# i = pkg:dir
local dir=${i#*:}
local pkg=${i%:*}
- if [ -d "$dir" ]; then
- msg "Entering $dir"
- cd "$dir" && $0 $forceroot $keep $quiet $install_deps \
- $recursive $upgrade abuildindex || return 1
- fi
+
+ # ignore if dependency is in other repo
+ [ -d "$dir" ] || continue
+
+ # break cricular deps
+ list_has $pkg $ABUILD_VISITED && continue
+ export ABUILD_VISITED="$ABUILD_VISITED $pkg"
+
+ msg "Entering $dir"
+ cd "$dir" && $0 $forceroot $keep $quiet $install_deps \
+ $recursive $upgrade abuildindex || return 1
done
$SUDO $APK add -u --repository "$abuildrepo" \
--wait 30 \