summaryrefslogtreecommitdiff
path: root/bin/common-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-13 14:28:59 +0200
committerErich Eckner <git@eckner.net>2017-09-13 14:28:59 +0200
commitab6335819fd13daf88e628d9fc4f9b44bec13af0 (patch)
tree3994e0d4d46ce583ae410aaa46ec61d216416858 /bin/common-functions
parent8a8d2d7644c275cea599ac91d2d83154c91547a9 (diff)
downloadbuilder-ab6335819fd13daf88e628d9fc4f9b44bec13af0.tar.xz
clean up meta-data naming mess: {needs; depends} -> {run-depends, build-depends} (content differs, too)
Diffstat (limited to 'bin/common-functions')
-rwxr-xr-xbin/common-functions48
1 files changed, 29 insertions, 19 deletions
diff --git a/bin/common-functions b/bin/common-functions
index 552e0e9..f255bb6 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -150,8 +150,8 @@ generate_package_metadata() {
file_prefix="${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}"
if [ -e "${file_prefix}.builds" ] && \
- [ -e "${file_prefix}.depends" ] && \
- [ -e "${file_prefix}.needs" ] && \
+ [ -e "${file_prefix}.build-depends" ] && \
+ [ -e "${file_prefix}.run-depends" ] && \
[ -e "${file_prefix}.groups" ] && \
[ -e "${file_prefix}.packages" ]; then
return 0
@@ -191,26 +191,36 @@ generate_package_metadata() {
sort -u > \
"${file_prefix}.builds"
- # extract "depends" = makedepends \cup checkdepends \cup depends \cup \{ base, base-devel \}
- (
- 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"
- ) | \
- cut -d= -f2 | \
- sed 's|^\s\+||; s|[<>]$||' | \
- sort -u > \
- "${file_prefix}.depends"
+ # extract "build-depends" = makedepends \cup checkdepends \cup depends \cup \{ base, base-devel \} \setminus "builds"
+ {
+ {
+ 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"
+ } | \
+ cut -d= -f2 | \
+ sed 's|^\s\+||; s|[<>]$||' | \
+ sort -u
+ sed 'p' "${file_prefix}.builds"
+ } | \
+ sort | \
+ uniq -u > \
+ "${file_prefix}.build-depends"
- # extract "needs" = "depends" \setminus ( "builds" \cup \{ base-devel \} )
- (
- cat "${file_prefix}.depends"
+ # extract "run-depends" = depends \cup \{ base \} \setminus "builds"
+ {
+ {
+ printf 'all_depend = %s\n' 'base'
+ sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
+ } | \
+ cut -d= -f2 | \
+ sed 's|^\s\+||; s|[<>]$||' | \
+ sort -u
sed 'p' "${file_prefix}.builds"
- printf '%s\n' 'base-devel' 'base-devel'
- ) | \
+ } | \
sort | \
uniq -u > \
- "${file_prefix}.needs"
+ "${file_prefix}.run-depends"
rm "${file_prefix}.SRCINFO"
@@ -798,7 +808,7 @@ find_dependencies_on_build_list() {
generate_package_metadata "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
(
- cat "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.needs"
+ cat "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.build-depends"
grep -vxF 'break_loops' "${work_dir}/build-list" | \
awk '{print $1 "." $2 "." $3 "." $4}' | \
sed "