build-package.sh: break possible circular dependencies

This commit is contained in:
Leonid Pliushch 2019-05-09 22:38:42 +03:00
parent d9274b596d
commit c2b843a72d
1 changed files with 6 additions and 4 deletions

View File

@ -69,10 +69,12 @@ termux_create_subpackages() {
Homepage: $TERMUX_PKG_HOMEPAGE Homepage: $TERMUX_PKG_HOMEPAGE
HERE HERE
if [ -n "$TERMUX_SUBPKG_DEPENDS" ]; then if ! grep -qwP "[^\w]*${SUB_PKG_NAME}[^\w]*" <(echo "${TERMUX_PKG_DEPENDS}"); then
echo "Depends: $TERMUX_PKG_NAME (= $TERMUX_PKG_FULLVERSION), $TERMUX_SUBPKG_DEPENDS" >> control if [ -n "$TERMUX_SUBPKG_DEPENDS" ]; then
else echo "Depends: $TERMUX_PKG_NAME (= $TERMUX_PKG_FULLVERSION), $TERMUX_SUBPKG_DEPENDS" >> control
echo "Depends: $TERMUX_PKG_NAME (= $TERMUX_PKG_FULLVERSION)" >> control else
echo "Depends: $TERMUX_PKG_NAME (= $TERMUX_PKG_FULLVERSION)" >> control
fi
fi fi
test ! -z "$TERMUX_SUBPKG_BREAKS" && echo "Breaks: $TERMUX_SUBPKG_BREAKS" >> control test ! -z "$TERMUX_SUBPKG_BREAKS" && echo "Breaks: $TERMUX_SUBPKG_BREAKS" >> control