summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-31 22:00:34 +0100
committerErich Eckner <git@eckner.net>2017-10-31 22:00:34 +0100
commit67f8c6e52aae3923171c7faf5bba8db6a4f8d35e (patch)
tree23938c7698ceeba2f3d2d9c8f26b27e6afe82b98
parent96eea0dc3a6d54d0a75ec72943f1a535afa0c830 (diff)
downloadbuilder-67f8c6e52aae3923171c7faf5bba8db6a4f8d35e.tar.xz
bin/common-functions: find depends (more) correctly in split packages
-rwxr-xr-xbin/common-functions10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/common-functions b/bin/common-functions
index 1330bd1..fe77a06 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -195,8 +195,12 @@ generate_package_metadata() {
{
{
printf 'all_depend = %s\n' 'base' 'base-devel'
- sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
- grep "$(printf '^\t\\(makedepends\\|checkdepends\\) = ')" "${file_prefix}.SRCINFO"
+ sed -n "$(
+ printf '/^\t%s = /p' \
+ 'depends' \
+ 'makedepends' \
+ 'checkdepends'
+ )" "${file_prefix}.SRCINFO"
} | \
cut -d= -f2 | \
sed 's|^\s\+||; s|[<>]$||' | \
@@ -211,7 +215,7 @@ generate_package_metadata() {
{
{
printf 'all_depend = %s\n' 'base'
- sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
+ sed -n "$(printf '/^\tdepends = /p')" "${file_prefix}.SRCINFO"
} | \
cut -d= -f2 | \
sed 's|^\s\+||; s|[<>]$||' | \