summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2020-05-11 00:45:49 +0200
committerAndrew Gregory <andrew@archlinux.org>2020-06-18 11:02:28 +0200
commitb3be0ce99b29e5384969c7b3e5ff6f4b0f581c4b (patch)
treeb8d8a50471ab1bdbc3bcc987cec26e4d0fa5d973 /scripts
parent68418c54427b2ecbd5f882ffad261e0ba6e67c42 (diff)
downloadpacman-b3be0ce99b29e5384969c7b3e5ff6f4b0f581c4b.tar.gz
pacman-b3be0ce99b29e5384969c7b3e5ff6f4b0f581c4b.tar.xz
makepkg: deterministic PKGINFO libprovides for multiple library versions
While iterating over the provides array, the find call for locating a shared library may result in listing multiple entries which by itself does not produce a stable deterministic order and may vary depending on the underlying filesystem. To provide a stable listing and a reproducible .PKGINFO file the result of find is piped to sort with a static LC_ALL=C localisation. Signed-off-by: Levente Polyak <anthraxx@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 8ce142a2552418f64a74e773f659d92b065d6209)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index dd9a592b..c928e562 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -526,7 +526,7 @@ find_libprovides() {
missing=0
case "$p" in
*.so)
- mapfile -t filename < <(find "$pkgdir" -type f -name $p\*)
+ mapfile -t filename < <(find "$pkgdir" -type f -name $p\* | LC_ALL=C sort)
if [[ $filename ]]; then
# packages may provide multiple versions of the same library
for fn in "${filename[@]}"; do