From 172c5a102d8daff41e1dd21aa0d1bb0fde835532 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 21 Jun 2018 22:39:25 +0200 Subject: lib/common-functions: dependency mangling should happen for _parts_ of split packages --- lib/common-functions | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) (limited to 'lib') diff --git a/lib/common-functions b/lib/common-functions index 84ff58d..64a11a7 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -319,35 +319,20 @@ make_source_info() { printf 'upstream_git_repository = %s\n' "${git_repo}" printf 'PKGBUILD = %s\n' "${PKGBUILD}" printf 'PKGBUILD_mod = %s\n' "${PKGBUILD_mod}" - if [ "${package%-i18n}-i18n" = "${package}" ]; then - case "${package%-i18n}" in - 'python-oslo'|'python2-oslo') - ;; - *) - # *-i18n packages should have this dependency - printf '\tdepends = %s\n' "${package%-i18n}" - ;; - esac - elif [ "${package%-doc}-doc" = "${package}" ]; then - case "${package%-doc}" in - 'gtk') - ;; - 'openjdk'*) - printf '\tdepends = %s\n' "${package%-doc}-src" - ;; - 'qt5') - printf '\tdepends = %s\n' "${package%-doc}-base" - ;; - *) - # *-doc packages should have this dependency - printf '\tdepends = %s\n' "${package%-doc}" - ;; - esac - elif [ "${package%-docs}-docs" = "${package}" ]; then - # *-doc packages should have this dependency - printf '\tdepends = %s\n' "${package%-docs}" - fi - makepkg --printsrcinfo + makepkg --printsrcinfo | \ + sed ' + /^pkgname = / ! b + /= python2\?-oslo-i18n$/ b + s/= \(\S\+\)-i18n$/\0\n\tdepends = \1/ + t + /= gtk-doc$/ b + s/= \(openjdk[0-9]\+\)-doc$/\0\n\tdepends = \1-src/ + t + s/= \(qt5\)-doc$/\0\n\tdepends = \1-base/ + t + s/= \(\S\+\)-docs\?$/\0\n\tdepends = \1/ + t + ' cd .. } > \ "${output}" || \ -- cgit v1.2.3-70-g09d2