Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/common-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-29 20:35:37 +0200
committerErich Eckner <git@eckner.net>2017-07-29 20:35:55 +0200
commit40ff3da46482c7a3992096a193bd4f704a65a120 (patch)
tree68f54a859358d5915c76277aa53d61cb5e720c15 /bin/common-functions
parentb224b5ac1dd6f219ac59477d30d84a8732e31b90 (diff)
new routine to find dependencies on the build list: "find_dependencies_on_build_list"
Diffstat (limited to 'bin/common-functions')
-rwxr-xr-xbin/common-functions28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/common-functions b/bin/common-functions
index d251741..923fbb0 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -642,3 +642,31 @@ extract_source_directory() {
sed -i '/^\$Id\$$/d' "${output}/PKGBUILD"
}
+
+# find_dependencies_on_build_list $package $git_revision $mod_git_revision $repository
+# return a list of packages on the build list which are dependencies of the given package
+
+find_dependencies_on_build_list() {
+
+ local package="$1"
+ local git_revision="$2"
+ local mod_git_revision="$3"
+ local repository="$4"
+
+ generate_package_metadata "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
+
+ (
+ cat "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.needs"
+ grep -vxF 'break_loops' "${work_dir}/build-list" | \
+ awk '{print $1 "." $2 "." $3 "." $4}' | \
+ sed "
+ s|^|${work_dir}/package-infos/|
+ s|\$|\.builds|
+ " | \
+ xargs -r cat | \
+ sort -u
+ ) | \
+ sort | \
+ uniq -d
+
+}