summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-01-09 16:23:46 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-09 16:23:46 +0100
commit13aec9a1419dc53aede75c404bd84007b375b0c1 (patch)
tree26cb25aa5749bd8cf8c63ddd98536c3fd0401337 /abuild.in
parent2f8bbc819e1e121f97162a674528c924cd0687c0 (diff)
downloadabuild-13aec9a1419dc53aede75c404bd84007b375b0c1.tar.gz
abuild-13aec9a1419dc53aede75c404bd84007b375b0c1.tar.bz2
abuild-13aec9a1419dc53aede75c404bd84007b375b0c1.tar.xz
abuild-13aec9a1419dc53aede75c404bd84007b375b0c1.zip
abuild: avoid add depends to itself
packages should never depend on themselves which does not make sense. This may happen if main package depends on a subpackage, then the subpackages will inherit the global depends and the subpackage ends up depend on itself. Fix abuild to avoid this.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 566f528..6857ff0 100644
--- a/abuild.in
+++ b/abuild.in
@@ -991,7 +991,9 @@ prepare_metafiles() {
echo "replaces = $i" >> "$pkginfo"
done
for i in $deps; do
- echo "depend = $i" >> "$pkginfo"
+ if [ "$i" != "$name" ]; then
+ echo "depend = $i" >> "$pkginfo"
+ fi
done
for i in $provides; do
echo "provides = $i" >> "$pkginfo"