From 357abccddc48e1a2382dab645ea30da2dce14431 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Thu, 17 Dec 2020 13:55:52 -0500 Subject: [PATCH] Correctly get the age of tarballs through their symlink find throws an error if the PATH_LIST references a tarball under stx/downloads, which is a symlink to the tarballs real location under the stx-tools. Modify the find command to follow the symlink. Closes-Bug: 1908570 Signed-off-by: Scott Little Change-Id: Ia691c211715d561b3a4ffca6c4408927aa1e48e8 --- build-tools/build-srpms-parallel | 4 ++-- build-tools/build-srpms-serial | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-tools/build-srpms-parallel b/build-tools/build-srpms-parallel index 5d7b6282..3e667986 100755 --- a/build-tools/build-srpms-parallel +++ b/build-tools/build-srpms-parallel @@ -787,7 +787,7 @@ build_dir_srpm () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) echo "$AGE2" fi ) @@ -1138,7 +1138,7 @@ build_dir_spec () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) echo "$AGE2" fi ) diff --git a/build-tools/build-srpms-serial b/build-tools/build-srpms-serial index e83ac519..37d4e4bb 100755 --- a/build-tools/build-srpms-serial +++ b/build-tools/build-srpms-serial @@ -765,7 +765,7 @@ build_dir_srpm () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) echo "$AGE2" fi ) @@ -1115,7 +1115,7 @@ build_dir_spec () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) echo "$AGE2" fi )