Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-11 15:32:56 +0200
committerErich Eckner <git@eckner.net>2018-09-11 15:32:56 +0200
commit89917e5af7236e7544323bc7a81ac9e88b854bf1 (patch)
tree69c91c5fc52bef41a71b0f8485bc660e192de146 /bin/build-packages
parent2b4578976b2eb99a753c43b6edee3e165c2e14b1 (diff)
bin/build-packages: add "glibc>=$installed_glibc_version" as dependency
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/build-packages b/bin/build-packages
index d6a2ede..982a908 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -11,8 +11,6 @@
# TODO: report back memory and hdd stats to the build master on successful build
-# TODO: if linked against glibc, add ">=$installed_glibc_version"
-
# shellcheck disable=SC2016
usage() {
>&2 echo ''
@@ -533,7 +531,13 @@ while [ "${count}" -ne 0 ] && \
find "${tar_content_dir}" -maxdepth 1 \
-name '*.pkg.tar.xz' | \
while read -r pkgfile; do
- touch "${pkgfile}.so.needs"
+ tar -OxJf "${pkgfile}" '.BUILDINFO' 2>/dev/null | \
+ sed -n '
+ s/^installed = \(glibc\)-\([0-9.]\+\)\(-[^-]\+\)\{2\}$/\1>=\2/
+ T
+ p
+ ' > \
+ "${pkgfile}.so.needs"
if printf '%s\n' "${pkgfile}" | \
grep -vq -- '-any\.pkg\.tar\.xz$'; then
# we do not check "any" packages for linked libraries