diff options
Diffstat (limited to 'bin/common-functions')
-rwxr-xr-x | bin/common-functions | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/bin/common-functions b/bin/common-functions index edec2fe..2e55d5b 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -159,18 +159,6 @@ generate_package_metadata() { sort -u > \ "${file_prefix}.packages" - # extract "needs" = depends \setminus "builds" - ( - grep "$(printf '^\tdepends = ')" "${file_prefix}.SRCINFO" | \ - cut -d= -f2 | \ - sed 's|^\s\+||; s|[<>]$||' | \ - sort -u - sed 'p' "${file_prefix}.builds" - ) | \ - sort | \ - uniq -u > \ - "${file_prefix}.needs" - # extract "depends" = makedepends \cup checkdepends \cup depends ( sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO" @@ -181,6 +169,15 @@ generate_package_metadata() { sort -u > \ "${file_prefix}.depends" + # extract "needs" = "depends" \setminus "builds" + ( + cat "${file_prefix}.depends" + sed 'p' "${file_prefix}.builds" + ) | \ + sort | \ + uniq -u > \ + "${file_prefix}.needs" + rm "${file_prefix}.SRCINFO" } |