diff options
author | Erich Eckner <git@eckner.net> | 2017-06-29 11:44:29 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-29 11:44:29 +0200 |
commit | d39cea2a852127db12fe09f821e4581fd052cd2c (patch) | |
tree | abdb3875cb22ab8c74f27535c638f95b3aad2874 | |
parent | ee4e197d6fe0ccb11b6ce03de92ab44af531957a (diff) | |
download | builder-d39cea2a852127db12fe09f821e4581fd052cd2c.tar.xz |
bin/common-functions: *.needs now contains build- and runtime dependencies
-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" } |