public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH autotools-utils] Determine need of autoreconf through checksums, not mtimes.
@ 2012-01-22 15:07 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2012-01-22 15:07 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=399641
---
 autotools-utils.eclass |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/autotools-utils.eclass b/autotools-utils.eclass
index 7ed6856..5d2a987 100644
--- a/autotools-utils.eclass
+++ b/autotools-utils.eclass
@@ -362,14 +362,17 @@ autotools-utils_src_prepare() {
 
 	[[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
 
-	touch "${T}"/.autotools-utils.timestamp || die
+	at_checksum() {
+		find '(' -name 'Makefile.am' \
+			-o -name 'configure.ac' \
+			-o -name 'configure.in' ')' \
+			-exec cksum {} + | sort -k2
+	}
+
+	[[ ! ${want_autoreconf} ]] && local checksum=$(at_checksum)
 	epatch_user
 	if [[ ! ${want_autoreconf} ]]; then
-		if [[ $(find . -newer "${T}"/.autotools-utils.timestamp \
-				-a '(' -name 'Makefile.am' \
-				-o -name 'configure.ac' \
-				-o -name 'configure.in' ')' \
-				-print -quit) ]]; then
+		if [[ ${checksum} != $(at_checksum) ]]; then
 			einfo 'Will autoreconfigure due to user patches applied.'
 			want_autoreconf=yep
 		fi
-- 
1.7.8.4




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-22 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-22 15:07 [gentoo-dev] [PATCH autotools-utils] Determine need of autoreconf through checksums, not mtimes Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox