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.
This commit is contained in:
Natanael Copa 2019-01-09 16:23:46 +01:00
parent 2f8bbc819e
commit 13aec9a141

View File

@ -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"